Modifier | Constructor and Description |
---|---|
protected |
Model(EntityType type)
Constructs an entity with a given type.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Entity entity)
Adds the specified entity.
|
void |
addModule(Module module)
Adds the specified module as a child one for this object.
|
void |
addModules(java.util.Collection<? extends Module> modules)
Adds objects from the specified collection as children for this object.
|
java.util.Collection<Module> |
getModules()
Returns a collection of child modules.
|
equals, getEntityType, hashCode, toString
addMetaInfo, addMetaInfo, addMetaInfo, getMetaInfo, getMetaInfo, hasMetaInfo, hasMetaInfo
protected Model(EntityType type)
type
- the entity type.public void addModule(Module module)
module
- The module to be added as a child one.java.lang.IllegalArgumentException
- when argument is null
.public void addModules(java.util.Collection<? extends Module> modules)
modules
- The objects to be added as child modules.java.lang.IllegalArgumentException
- when argument is null
.public java.util.Collection<Module> getModules()
public void add(Entity entity)
Able to add entity of the appropriate type.
add
in class Entity
entity
- entity to be addedjava.lang.IllegalArgumentException
- when argument is null
;RetrascopeRuntimeException
- when the specified entity
is not of CfgModel
type.