|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgov.nasa.arc.brahms.common.rt.BrahmsObjectCtx
gov.nasa.arc.brahms.common.rt.ConceptCtx
gov.nasa.arc.brahms.common.rt.AreaCtx
public class AreaCtx
The AreaCtx is the runtime representation of areas defined in a Brahms model. The area context manages the creation and deletion time of the areas. Area contexts are also used to trace the traveled path of an active instance. In the case an area context is used to define a traveled path the start and end time represent the time the active instance arrived in the area and when the active instance left the area. The area context also manages a list of the active instances present in the location.
| Field Summary |
|---|
| Fields inherited from interface gov.nasa.arc.brahms.common.rt.IRuntimeConstants |
|---|
ABORTED, ACTIVE, ACTIVITY, AVAILABLE, COMPLETED, CONSEQUENCE, DETECTABLE, ENDED, ENGINE, EXTERNAL_AGENT, FROM, IMPASSED, INITIAL, INTERRUPTED, JAVA_PROPERTY, sABORTED, sACTIVE, sAVAILABLE, sCOMPLETED, sENDED, sIMPASSED, sINTERRUPTED, sUNAVAILABLE, TO, TRANSFER, UNAVAILABLE |
| Constructor Summary | |
|---|---|
AreaCtx(Area area)
Constructor, creates a new context for the specified area. |
|
| Method Summary | |
|---|---|
void |
addInhabitant(ActiveInstanceCtx inhabitant)
Adds the specified active instance to this location as an inhabitant |
java.util.Enumeration |
getInhabitants()
Returns a list of all the inhabitants in this location |
boolean |
isInhabitant(ActiveInstanceCtx inhabitant)
Returns whether or not the specified inhabitant is an inhabitant of this area. |
void |
removeAllInhabitants()
Removes all inhabitants from this area. |
void |
removeInhabitant(ActiveInstanceCtx inhabitant)
Removes the specified active instance from this location as an inhabitant |
| Methods inherited from class gov.nasa.arc.brahms.common.rt.ConceptCtx |
|---|
addAttribute, addRelation, getAttribute, getRelation, initAttributeRelationCache, removeAttribute, removeRelation, resetAttributeRelationCache, toString |
| Methods inherited from class gov.nasa.arc.brahms.common.rt.BrahmsObjectCtx |
|---|
addNote, getContextFor, getEndTime, getID, getNote, getNotes, getStartTime, removeNote, setContextFor, setEndTime, setID, setStartTime |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface gov.nasa.arc.brahms.common.rt.IBrahmsObjectCtx |
|---|
addNote, getContextFor, getEndTime, getID, getNote, getNotes, getStartTime, removeNote, setEndTime, setID, setStartTime |
| Constructor Detail |
|---|
public AreaCtx(Area area)
area - the Area for which to create a context| Method Detail |
|---|
public void addInhabitant(ActiveInstanceCtx inhabitant)
throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
addInhabitant in interface IAreaCtxinhabitant - the active instance to be added
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if a null inhabitant is specified
public void removeInhabitant(ActiveInstanceCtx inhabitant)
throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
removeInhabitant in interface IAreaCtxinhabitant - the active instance to be removed
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if a null inhabitant is specified, if no inhabitants
are present in the location or if the inhabitant is not foundpublic boolean isInhabitant(ActiveInstanceCtx inhabitant)
isInhabitant in interface IAreaCtxinhabitant - the inhabitant to be tested
public java.util.Enumeration getInhabitants()
getInhabitants in interface IAreaCtxpublic void removeAllInhabitants()
removeAllInhabitants in interface IAreaCtx
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||