Package jadex.rules.state.javaimpl
Class OAVContentIdState
- java.lang.Object
- 
- jadex.rules.state.javaimpl.OAVAbstractState
- 
- jadex.rules.state.javaimpl.OAVContentIdState
 
 
- 
- All Implemented Interfaces:
- IOAVState
 
 public class OAVContentIdState extends OAVAbstractState An object holding the state as OAV triples (object, attribute, value).
- 
- 
Field SummaryFields Modifier and Type Field Description protected java.util.SetobjectsThe objects table.- 
Fields inherited from class jadex.rules.state.javaimpl.OAVAbstractStatebeanlistenercnt, deletedobjects, eventhandler, generator, javaidentity, javaobjects, nocheck, objectusages, PCL, pcls, profiler, rootobjects, substates, synchronizator, tmodel, TYPE
 
- 
 - 
Constructor SummaryConstructors Constructor Description OAVContentIdState(OAVTypeModel tmodel)Create a new empty OAV state representation.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddExternalObjectUsage(java.lang.Object id, java.lang.Object external)Add an external usage of a state object (oid).protected booleancheckValidStateObjectRead(java.lang.Object id)Test if reading the object (oid) is allowed.IOAVIdGeneratorcreateIdGenerator()Create an id generator.protected booleaninternalContainsObject(java.lang.Object id)Test if an object is contained in the state.protected java.util.MapinternalCreateObject(java.lang.Object id)Internally create an object.protected java.util.MapinternalGetObjectContent(java.lang.Object id)Get the object content of an object.protected java.util.SetinternalGetObjects()Get a set of the internal state objects.protected intinternalObjectsSize()Test how many object are contained in the state.protected java.util.MapinternalRemoveObject(java.lang.Object id)Remove an object from the state objects.protected booleanisExternallyUsed(java.lang.Object id)Test if an object is externally used.voidremoveExternalObjectUsage(java.lang.Object id, java.lang.Object external)Remove an external usage of a state object (oid).- 
Methods inherited from class jadex.rules.state.javaimpl.OAVAbstractStateaddAttributeValue, addJavaRootObject, addObjectUsage, addStateListener, addSubstate, checkMultiplicity, checkMultiplicity, checkTypeDefined, checkTypeHasAttribute, checkValidStateObject, checkValidStateValue, checkValueCompatibility, containsKey, containsObject, createObject, createObject, createRootObject, deregisterValue, dispose, dropObject, equals, expungeStaleObjects, findCycle, findCycleForValue, getAttributeKeys, getAttributeValue, getAttributeValue, getAttributeValues, getDeepObjects, getObject, getObject0, getObjects, getObjectUsages, getProfiler, getReferencingObjects, getRootObjects, getSize, getSubstates, getSynchronizator, getType, getTypeModel, getUnreferencedObjects, internalDropObject, isIdentifier, isJavaIdentity, isManaged, isReachable, notifyEventListeners, registerValue, removeAttributeValue, removeJavaRootObject, removeObject, removeObjectUsage, removeStateListener, setAttributeValue, setProfiler, setSynchronizator, toString
 
- 
 
- 
- 
- 
Constructor Detail- 
OAVContentIdStatepublic OAVContentIdState(OAVTypeModel tmodel) Create a new empty OAV state representation.
 
- 
 - 
Method Detail- 
createIdGeneratorpublic IOAVIdGenerator createIdGenerator() Create an id generator.- Overrides:
- createIdGeneratorin class- OAVAbstractState
- Returns:
- The id generator.
 
 - 
addExternalObjectUsagepublic void addExternalObjectUsage(java.lang.Object id, java.lang.Object external)Add an external usage of a state object (oid). This prevents the oav object of being garbage collected as long as external references are present.- Specified by:
- addExternalObjectUsagein interface- IOAVState
- Specified by:
- addExternalObjectUsagein class- OAVAbstractState
- Parameters:
- id- The oav object id.
- external- The user object.
 
 - 
removeExternalObjectUsagepublic void removeExternalObjectUsage(java.lang.Object id, java.lang.Object external)Remove an external usage of a state object (oid). This allows the oav object of being garbage collected when no further external references and no internal references are present.- Specified by:
- removeExternalObjectUsagein interface- IOAVState
- Specified by:
- removeExternalObjectUsagein class- OAVAbstractState
- Parameters:
- id- The oav object id.
- external- The state external object.
 
 - 
isExternallyUsedprotected boolean isExternallyUsed(java.lang.Object id) Test if an object is externally used.- Specified by:
- isExternallyUsedin class- OAVAbstractState
- Parameters:
- id- The id.
- Returns:
- True, if externally used.
 
 - 
internalCreateObjectprotected java.util.Map internalCreateObject(java.lang.Object id) Internally create an object.- Specified by:
- internalCreateObjectin class- OAVAbstractState
- Parameters:
- id- The id.
- Returns:
- The content map of the new object.
 
 - 
internalRemoveObjectprotected java.util.Map internalRemoveObject(java.lang.Object id) Remove an object from the state objects.- Specified by:
- internalRemoveObjectin class- OAVAbstractState
- Parameters:
- id- The id.
- Returns:
- The content map of the object.
 
 - 
internalGetObjectContentprotected java.util.Map internalGetObjectContent(java.lang.Object id) Get the object content of an object.- Specified by:
- internalGetObjectContentin class- OAVAbstractState
- Parameters:
- id- The id.
- Returns:
- The content map of the object.
 
 - 
internalContainsObjectprotected boolean internalContainsObject(java.lang.Object id) Test if an object is contained in the state.- Specified by:
- internalContainsObjectin class- OAVAbstractState
- Parameters:
- id- The id.
- Returns:
- True, if object is contained.
 
 - 
internalObjectsSizeprotected int internalObjectsSize() Test how many object are contained in the state.- Specified by:
- internalObjectsSizein class- OAVAbstractState
- Returns:
- The number of objects.
 
 - 
internalGetObjectsprotected java.util.Set internalGetObjects() Get a set of the internal state objects.- Specified by:
- internalGetObjectsin class- OAVAbstractState
- Returns:
- A set of the state objects.
 
 - 
checkValidStateObjectReadprotected boolean checkValidStateObjectRead(java.lang.Object id) Test if reading the object (oid) is allowed. Reading is allowed on removed objects as long as there are external references.- Overrides:
- checkValidStateObjectReadin class- OAVAbstractState
- Parameters:
- id- The object (oid).
- Returns:
- True, if valid.
 
 
- 
 
-