|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractSet
com.steptools.stdev.PopulationBase
public abstract class PopulationBase
Provides a persistent collection of EntityInstances within a Model. The PopulationBase class is extended by a class named Population in the namespace of the schema.
Populations can only be created by the
Model.newPopulation(SchemaBase, Object) method.
To access the EntityInstance in a populatrion, use either the
getFolder or getExtent method. These methods return
a set of all instance of a given entity type. The getFolders method
returns the set of instances whose type exactly matches the requested type,
while the getExtent method returns the instances in the folder, plus
all the subtypes of the specified entity.
Population implements the EntityInstanceSet inteface, to provide convientent
access to all of the entity instances contained within. This enable an
entiry population to be passed pased as a parameter to
EntityInstance.usedin.
| Method Summary | |
|---|---|
void |
addInstance(EntityInstance inst)
Adds an EntityInstance to this population. |
boolean |
contains(EntityInstance inst)
Determines if this population contains a specified instance. |
EntityExtent |
getExtent(EntityDomain dom)
Get the entity extent for a specified type. |
EntityExtent |
getFolder(EntityDomain dom)
Get the folder for a specified type. |
java.util.Collection |
getFolders()
Get all the folders in this population. |
java.lang.Object |
getIdentifier()
Gets the identifier for the section |
Model |
getModel()
Gets the model for the population |
abstract SchemaBase |
getSchema()
Gets the schema for the population |
boolean |
isUser()
Determines if this is a user population. |
java.util.Iterator |
iterator()
Get all the instances in this population. |
EntityInstance |
newInstance(EntityDomain dom)
Create a new instance of the specified instance |
EntityInstance |
newInstance(EntityDomain[] sups)
Create a new complex instance within this population |
EntityInstance |
newInstance(java.util.List sups)
Create a new complex instance within this population |
void |
removeInstance(EntityInstance inst)
Remove an instance from the population. |
int |
size()
Get the number of instances in this population. |
| Methods inherited from class java.util.AbstractSet |
|---|
equals, hashCode, removeAll |
| Methods inherited from class java.util.AbstractCollection |
|---|
add, addAll, clear, contains, containsAll, isEmpty, remove, retainAll, toArray, toArray, toString |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Set |
|---|
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, toArray, toArray |
| Method Detail |
|---|
public abstract SchemaBase getSchema()
public final Model getModel()
public final java.lang.Object getIdentifier()
public boolean isUser()
public final void addInstance(EntityInstance inst)
throws TypeException
inst - The instance to add.
TypeException - The instance is not of an entity in this
population's schema
public final void removeInstance(EntityInstance inst)
throws ModelMemberException
inst - The instance to remove.
ModelMemberException - The requested instance was not in this
populationpublic final boolean contains(EntityInstance inst)
inst - The instance
true if the specified instance is contained in
this model.public final EntityExtent getExtent(EntityDomain dom)
dom - The requested type.
public final EntityExtent getFolder(EntityDomain dom)
dom - The requested type.
public final java.util.Collection getFolders()
public final java.util.Iterator iterator()
iterator in interface java.lang.Iterableiterator in interface java.util.Collectioniterator in interface java.util.Setiterator in class java.util.AbstractCollectionpublic final int size()
size in interface java.util.Collectionsize in interface java.util.Setsize in class java.util.AbstractCollectionpublic final EntityInstance newInstance(java.util.List sups)
sups - List of supertypes.
null if the
instance could not be created
TypeException - The domain is not in the schema of this
population.public final EntityInstance newInstance(EntityDomain[] sups)
sups - Array of supertypes.
null if the
instance could not be created
TypeException - The domain is not in the schema of this
population.public final EntityInstance newInstance(EntityDomain dom)
dom - The domain of the instance.
TypeException - The domain is not in the schema of this
population.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||