Package jadex.rules.state.javaimpl
Class OAVAbstractState
- java.lang.Object
-
- jadex.rules.state.javaimpl.OAVAbstractState
-
- All Implemented Interfaces:
IOAVState
- Direct Known Subclasses:
OAVContentIdState
,OAVMixedWeakState
,OAVState
public abstract class OAVAbstractState extends java.lang.Object implements IOAVState
An object holding the state as OAV triples (object, attribute, value).
-
-
Field Summary
Fields Modifier and Type Field Description protected int
beanlistenercnt
Counter for number of registered bean listeners.protected java.util.Map
deletedobjects
The deleted objects (only available in event notifications) (oid -> content map).protected OAVEventHandler
eventhandler
The OAV event handler.protected IOAVIdGenerator
generator
The id generator.protected boolean
javaidentity
Flag to enable identity handling of java objects (instead of equality).protected java.util.Set
javaobjects
The java objects set.protected boolean
nocheck
The flag to disable type checking.protected java.util.Map
objectusages
The usages of object ids (object id -> usages[map] (objectusage -> cnt)).protected static java.lang.Class[]
PCL
The argument types for property change listener adding/removal (cached for speed).protected java.util.Map
pcls
The Java beans property change listeners.protected IProfiler
profiler
The profiler.protected java.util.Set
rootobjects
The root objects (will not be cleaned up when usages==0) (oids + java objects).protected IOAVState[]
substates
List of substates (if any).protected ISynchronizator
synchronizator
The synchronizator (if any).protected OAVTypeModel
tmodel
The type models.protected static java.lang.String
TYPE
The type identifier.
-
Constructor Summary
Constructors Constructor Description OAVAbstractState(OAVTypeModel tmodel)
Create a new empty OAV state representation.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addAttributeValue(java.lang.Object id, OAVAttributeType attribute, java.lang.Object value)
Add an attribute of an object (oid) to the given value.abstract void
addExternalObjectUsage(java.lang.Object id, java.lang.Object external)
Add an external usage of a state object (oid).void
addJavaRootObject(java.lang.Object object)
Add a Java object as root object.protected void
addObjectUsage(java.lang.Object whichid, OAVAttributeType whichattr, java.lang.Object value)
Add an object (oid of java object) usage.void
addStateListener(IOAVStateListener listener, boolean bunch)
Add a new state listener.void
addSubstate(IOAVState substate)
Add a substate.protected boolean
checkMultiplicity(java.lang.Object id, OAVAttributeType attribute, java.lang.String allowedmult)
Ensure that multiplicity is ok.protected boolean
checkMultiplicity(java.lang.Object id, OAVAttributeType attribute, java.util.Set allowedmults)
Ensure that multiplicity is ok.protected boolean
checkTypeDefined(OAVObjectType type)
Test if a type is defined in one of the models.protected boolean
checkTypeHasAttribute(java.lang.Object id, OAVAttributeType attribute)
Ensure that a type has an attribute.protected boolean
checkValidStateObject(java.lang.Object id)
Test if the object is a valid state object (oid).protected boolean
checkValidStateObjectRead(java.lang.Object id)
Test if reading the object (oid) is allowed.protected boolean
checkValidStateValue(java.lang.Object value)
Test if the object is a valid state value, meaning that is either a state object or a java value.protected boolean
checkValueCompatibility(java.lang.Object id, OAVAttributeType attribute, java.lang.Object value)
Check if it is allowed to set or add an attribute value.boolean
containsKey(java.lang.Object id, OAVAttributeType attribute, java.lang.Object key)
Test if a key is contained in the map attribute.boolean
containsObject(java.lang.Object id)
Test if the state contains a specific object (oid).IOAVIdGenerator
createIdGenerator()
Create an id generator.java.lang.Object
createObject(OAVObjectType type)
Create an object.protected java.lang.Object
createObject(OAVObjectType type, boolean root)
Impl of root/non-root object creation.java.lang.Object
createRootObject(OAVObjectType type)
Create a root object.protected void
deregisterValue(OAVJavaType type, java.lang.Object value)
Deregister a value for observation.void
dispose()
Dispose the state.void
dropObject(java.lang.Object id)
Drop an object (oid) from the state.boolean
equals(java.lang.Object a, java.lang.Object b)
Test if two values are equal according to current identity/equality settings.void
expungeStaleObjects()
Expunge stale objects.java.util.List
findCycle(java.util.Collection oids)
Find a cycle in a given set of objects (oids).protected java.util.List
findCycleForValue(java.util.Collection oids, java.util.Set checked, java.util.Map edges, java.util.List subgraph, java.lang.Object current, java.lang.Object next, OAVAttributeType attr)
Step for one edge of the find cycle algorithm.java.util.Collection
getAttributeKeys(java.lang.Object id, OAVAttributeType attribute)
Get the keys of an attribute of an object.java.lang.Object
getAttributeValue(java.lang.Object id, OAVAttributeType attribute)
Get an attribute value of an object (oid).java.lang.Object
getAttributeValue(java.lang.Object id, OAVAttributeType attribute, java.lang.Object key)
Get an attribute value of an object (oid).java.util.Collection
getAttributeValues(java.lang.Object id, OAVAttributeType attribute)
Get the values of an attribute of an object (oid).java.util.Iterator
getDeepObjects()
Get all objects (oids and java objects) in the state and its substates.protected java.util.Map
getObject(java.lang.Object id)
Get an object map for its id.protected java.util.Map
getObject0(java.lang.Object id)
Get an object map for its id.java.util.Iterator
getObjects()
Get all objects (oids and java objects) in the state.protected java.util.Map
getObjectUsages(java.lang.Object object)
Get all object usages.IProfiler
getProfiler()
Get the profiler.java.util.Collection
getReferencingObjects(java.lang.Object value)
Get those objects referencing a given object (java object or oid).java.util.Iterator
getRootObjects()
Get the root objects (oids and java objects) of the state.int
getSize()
Get the number of objects (oids and java objects) in the state.IOAVState[]
getSubstates()
Get the substates.ISynchronizator
getSynchronizator()
Get the synchronizator (if any).OAVObjectType
getType(java.lang.Object object)
Get the type of an object (oid or java object).OAVTypeModel
getTypeModel()
Get the type model.java.util.Collection
getUnreferencedObjects()
Get all unreferenced objects (oids).protected abstract boolean
internalContainsObject(java.lang.Object id)
Test if an object is contained in the state.protected abstract java.util.Map
internalCreateObject(java.lang.Object id)
Internally create an object.protected void
internalDropObject(java.lang.Object id, java.util.Set dropset, boolean keepalive)
Internal drop method for avoiding cycles in to be dropped objects during a recursive drop operation.protected abstract java.util.Map
internalGetObjectContent(java.lang.Object id)
Get the object content of an object.protected abstract java.util.Set
internalGetObjects()
Get a set of the internal state objects.protected abstract int
internalObjectsSize()
Test how many object are contained in the state.protected abstract java.util.Map
internalRemoveObject(java.lang.Object id)
Remove an object from the state objects.protected abstract boolean
isExternallyUsed(java.lang.Object id)
Test if an object is externally used.boolean
isIdentifier(java.lang.Object object)
Test if the object represents an identifier.boolean
isJavaIdentity()
Flag indicating that java objects are stored by identity instead of equality.protected boolean
isManaged(java.lang.Object value)
Check if a value (oid or java object) is managed by the state.protected boolean
isReachable(java.lang.Object id, java.util.Set tested)
Test if an object (oid) can be reached from some root or external object.void
notifyEventListeners()
Throw collected events and notify the listeners.protected void
registerValue(OAVJavaType type, java.lang.Object value)
Register a value for observation.void
removeAttributeValue(java.lang.Object id, OAVAttributeType attribute, java.lang.Object value)
Remove an attribute of an object (oid) to the given value.abstract void
removeExternalObjectUsage(java.lang.Object id, java.lang.Object external)
Remove an external usage of a state object (oid).void
removeJavaRootObject(java.lang.Object object)
Drop a Java object from root objects.protected void
removeObject(java.lang.Object id)
Ultimately remove an object (oid), when there are no more external or internal references.protected void
removeObjectUsage(java.lang.Object whichid, OAVAttributeType whichattr, java.lang.Object value, java.util.Set dropset, boolean keepalive)
Remove an object (oid or java object) usage.void
removeStateListener(IOAVStateListener listener)
Remove a state listener.void
setAttributeValue(java.lang.Object id, OAVAttributeType attribute, java.lang.Object value)
Set an attribute of an object (oid) to the given value.void
setProfiler(IProfiler profiler)
Set the profiler.void
setSynchronizator(ISynchronizator synchronizator)
Set the synchronizator.java.lang.String
toString()
Get the string representation of the object.
-
-
-
Field Detail
-
PCL
protected static final java.lang.Class[] PCL
The argument types for property change listener adding/removal (cached for speed).
-
TYPE
protected static final java.lang.String TYPE
The type identifier.- See Also:
- Constant Field Values
-
tmodel
protected OAVTypeModel tmodel
The type models.
-
rootobjects
protected java.util.Set rootobjects
The root objects (will not be cleaned up when usages==0) (oids + java objects).
-
deletedobjects
protected java.util.Map deletedobjects
The deleted objects (only available in event notifications) (oid -> content map).
-
javaobjects
protected java.util.Set javaobjects
The java objects set.
-
generator
protected IOAVIdGenerator generator
The id generator.
-
nocheck
protected boolean nocheck
The flag to disable type checking.
-
objectusages
protected java.util.Map objectusages
The usages of object ids (object id -> usages[map] (objectusage -> cnt)).
-
pcls
protected java.util.Map pcls
The Java beans property change listeners.
-
eventhandler
protected OAVEventHandler eventhandler
The OAV event handler.
-
substates
protected IOAVState[] substates
List of substates (if any).
-
synchronizator
protected ISynchronizator synchronizator
The synchronizator (if any).
-
beanlistenercnt
protected int beanlistenercnt
Counter for number of registered bean listeners.
-
javaidentity
protected boolean javaidentity
Flag to enable identity handling of java objects (instead of equality).
-
profiler
protected IProfiler profiler
The profiler.
-
-
Constructor Detail
-
OAVAbstractState
public OAVAbstractState(OAVTypeModel tmodel)
Create a new empty OAV state representation.
-
-
Method Detail
-
createIdGenerator
public IOAVIdGenerator createIdGenerator()
Create an id generator.- Returns:
- The id generator.
-
getTypeModel
public OAVTypeModel getTypeModel()
Get the type model.- Specified by:
getTypeModel
in interfaceIOAVState
- Returns:
- The type model.
-
createObject
public java.lang.Object createObject(OAVObjectType type)
Create an object. Creates an object identifier that can be used to store/retrieve attribute values. May reuse old object identifiers for performance.- Specified by:
createObject
in interfaceIOAVState
- Parameters:
type
- The object type (null for defining meta types).- Returns:
- An object identifier.
-
createRootObject
public java.lang.Object createRootObject(OAVObjectType type)
Create a root object. A root object will not be automatically garbage collected when no references point to this object any longer. Creates an object identifier that can be used to store/retrieve attribute values. May reuse old object identifiers for performance.- Specified by:
createRootObject
in interfaceIOAVState
- Returns:
- An object identifier.
-
createObject
protected java.lang.Object createObject(OAVObjectType type, boolean root)
Impl of root/non-root object creation.
-
dropObject
public void dropObject(java.lang.Object id)
Drop an object (oid) from the state. Recursively removes the object and all connected objects that are not referenced elsewhere.- Specified by:
dropObject
in interfaceIOAVState
- Parameters:
id
- The identifier of the object to remove.
-
addJavaRootObject
public void addJavaRootObject(java.lang.Object object)
Add a Java object as root object.- Specified by:
addJavaRootObject
in interfaceIOAVState
- Parameters:
object
- The Java object.
-
removeJavaRootObject
public void removeJavaRootObject(java.lang.Object object)
Drop a Java object from root objects.- Specified by:
removeJavaRootObject
in interfaceIOAVState
- Parameters:
object
- The Java object.
-
internalDropObject
protected void internalDropObject(java.lang.Object id, java.util.Set dropset, boolean keepalive)
Internal drop method for avoiding cycles in to be dropped objects during a recursive drop operation.- Parameters:
id
- The object (oid) to be dropped.dropset
- A set of already dropped objects (to avoid infinite recursion).keepalive
- A flag indicating that at least one object in the path is externally referenced (object usages will not be removed, but set to external).
-
removeObject
protected void removeObject(java.lang.Object id)
Ultimately remove an object (oid), when there are no more external or internal references.
-
containsObject
public boolean containsObject(java.lang.Object id)
Test if the state contains a specific object (oid).- Specified by:
containsObject
in interfaceIOAVState
- Parameters:
id
- The object id.- Returns:
- True, if contained.
-
isIdentifier
public boolean isIdentifier(java.lang.Object object)
Test if the object represents an identifier.- Specified by:
isIdentifier
in interfaceIOAVState
- Parameters:
object
- The suspected object identifier.- Returns:
- True, if object identifier.
-
getType
public OAVObjectType getType(java.lang.Object object)
Get the type of an object (oid or java object).
-
getObjects
public java.util.Iterator getObjects()
Get all objects (oids and java objects) in the state.- Specified by:
getObjects
in interfaceIOAVState
-
getDeepObjects
public java.util.Iterator getDeepObjects()
Get all objects (oids and java objects) in the state and its substates.- Specified by:
getDeepObjects
in interfaceIOAVState
-
getRootObjects
public java.util.Iterator getRootObjects()
Get the root objects (oids and java objects) of the state.- Specified by:
getRootObjects
in interfaceIOAVState
-
getSize
public int getSize()
Get the number of objects (oids and java objects) in the state. Optional operation used for debugging only.
-
getUnreferencedObjects
public java.util.Collection getUnreferencedObjects()
Get all unreferenced objects (oids).- Specified by:
getUnreferencedObjects
in interfaceIOAVState
- Returns:
- All unreferenced objects of the state.
-
isReachable
protected boolean isReachable(java.lang.Object id, java.util.Set tested)
Test if an object (oid) can be reached from some root or external object.- Parameters:
id
- The objecttested
- The objects already traversed (to avoid endless loops).
-
findCycle
public java.util.List findCycle(java.util.Collection oids)
Find a cycle in a given set of objects (oids).
-
findCycleForValue
protected java.util.List findCycleForValue(java.util.Collection oids, java.util.Set checked, java.util.Map edges, java.util.List subgraph, java.lang.Object current, java.lang.Object next, OAVAttributeType attr)
Step for one edge of the find cycle algorithm.- Parameters:
current
- The current node (oid).next
- The next node (oid).
-
getReferencingObjects
public java.util.Collection getReferencingObjects(java.lang.Object value)
Get those objects referencing a given object (java object or oid).- Specified by:
getReferencingObjects
in interfaceIOAVState
-
getAttributeValue
public java.lang.Object getAttributeValue(java.lang.Object id, OAVAttributeType attribute)
Get an attribute value of an object (oid).- Specified by:
getAttributeValue
in interfaceIOAVState
- Parameters:
id
- The identifier of the object.attribute
- The attribute identifier.- Returns:
- The value (basic, object id or java object).
-
setAttributeValue
public void setAttributeValue(java.lang.Object id, OAVAttributeType attribute, java.lang.Object value)
Set an attribute of an object (oid) to the given value.- Specified by:
setAttributeValue
in interfaceIOAVState
- Parameters:
id
- The identifier of the object.attribute
- The attribute identifier.value
- The value (basic, object id or java object).
-
getAttributeValues
public java.util.Collection getAttributeValues(java.lang.Object id, OAVAttributeType attribute)
Get the values of an attribute of an object (oid).- Specified by:
getAttributeValues
in interfaceIOAVState
- Parameters:
id
- The identifier of the object.attribute
- The attribute identifier.- Returns:
- The values (basic, object ids or java objects).
-
getAttributeKeys
public java.util.Collection getAttributeKeys(java.lang.Object id, OAVAttributeType attribute)
Get the keys of an attribute of an object.- Specified by:
getAttributeKeys
in interfaceIOAVState
- Parameters:
id
- The identifier of the object.attribute
- The attribute identifier.- Returns:
- The keys for which values are stored.
-
getAttributeValue
public java.lang.Object getAttributeValue(java.lang.Object id, OAVAttributeType attribute, java.lang.Object key)
Get an attribute value of an object (oid). Method only applicable for map attribute type.- Specified by:
getAttributeValue
in interfaceIOAVState
- Parameters:
id
- The identifier of the object.attribute
- The attribute identifier.key
- The key.- Returns:
- The value (basic, object id or java object).
-
containsKey
public boolean containsKey(java.lang.Object id, OAVAttributeType attribute, java.lang.Object key)
Test if a key is contained in the map attribute.- Specified by:
containsKey
in interfaceIOAVState
- Parameters:
id
- The identifier of the object.attribute
- The attribute identifier.key
- The key.- Returns:
- True if key is available.
-
addAttributeValue
public void addAttributeValue(java.lang.Object id, OAVAttributeType attribute, java.lang.Object value)
Add an attribute of an object (oid) to the given value.- Specified by:
addAttributeValue
in interfaceIOAVState
- Parameters:
id
- The identifier of the object.attribute
- The attribute identifier.value
- The value (basic, object id or java object).
-
removeAttributeValue
public void removeAttributeValue(java.lang.Object id, OAVAttributeType attribute, java.lang.Object value)
Remove an attribute of an object (oid) to the given value.- Specified by:
removeAttributeValue
in interfaceIOAVState
- Parameters:
id
- The identifier of the object.attribute
- The attribute identifier.value
- The value (basic, object id or java object).
-
addStateListener
public void addStateListener(IOAVStateListener listener, boolean bunch)
Add a new state listener.- Specified by:
addStateListener
in interfaceIOAVState
- Parameters:
listener
- The state listener.bunch
- True, for adding a bunch listener.
-
removeStateListener
public void removeStateListener(IOAVStateListener listener)
Remove a state listener.- Specified by:
removeStateListener
in interfaceIOAVState
- Parameters:
listener
- The state listener.
-
notifyEventListeners
public void notifyEventListeners()
Throw collected events and notify the listeners.- Specified by:
notifyEventListeners
in interfaceIOAVState
-
getProfiler
public IProfiler getProfiler()
Get the profiler.- Specified by:
getProfiler
in interfaceIOAVState
-
setProfiler
public void setProfiler(IProfiler profiler)
Set the profiler.- Specified by:
setProfiler
in interfaceIOAVState
-
expungeStaleObjects
public void expungeStaleObjects()
Expunge stale objects.- Specified by:
expungeStaleObjects
in interfaceIOAVState
-
setSynchronizator
public void setSynchronizator(ISynchronizator synchronizator)
Set the synchronizator. The optional synchronizator is used to synchronize external modifications to the state (e.g. from bean changes). The synchronizator should only be set once, before the state is used.- Specified by:
setSynchronizator
in interfaceIOAVState
-
getSynchronizator
public ISynchronizator getSynchronizator()
Get the synchronizator (if any). The synchronizator (if available) can be used to synchronize access to the state with internal and external modifications.- Specified by:
getSynchronizator
in interfaceIOAVState
-
addExternalObjectUsage
public abstract 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:
addExternalObjectUsage
in interfaceIOAVState
- Parameters:
id
- The oav object id.external
- The user object.
-
removeExternalObjectUsage
public abstract 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:
removeExternalObjectUsage
in interfaceIOAVState
- Parameters:
id
- The oav object id.external
- The state external object.
-
toString
public java.lang.String toString()
Get the string representation of the object.- Overrides:
toString
in classjava.lang.Object
- Returns:
- The string representation.
-
getObject
protected java.util.Map getObject(java.lang.Object id)
Get an object map for its id.- Parameters:
id
- The id.- Returns:
- The object map.
-
getObject0
protected java.util.Map getObject0(java.lang.Object id)
Get an object map for its id.- Parameters:
id
- The id.- Returns:
- The object map.
-
checkValueCompatibility
protected boolean checkValueCompatibility(java.lang.Object id, OAVAttributeType attribute, java.lang.Object value)
Check if it is allowed to set or add an attribute value. For this purpose it is checked if the value is either a) a ObjectId -> type check via OAVObjectType b) a normal Java object -> type check via OAVJavaType Additionally multiplicity is checked.- Throws:
java.lang.RuntimeException
- if value is not allowed.
-
checkTypeHasAttribute
protected boolean checkTypeHasAttribute(java.lang.Object id, OAVAttributeType attribute)
Ensure that a type has an attribute.- Parameters:
id
- The object (oid).attribute
- The attribute.- Throws:
java.lang.RuntimeException
- if value is not allowed.
-
checkMultiplicity
protected boolean checkMultiplicity(java.lang.Object id, OAVAttributeType attribute, java.util.Set allowedmults)
Ensure that multiplicity is ok.- Parameters:
id
- The object (oid).attribute
- The attribute.multiplicity
- The multiplicity.- Throws:
java.lang.RuntimeException
- if value is not allowed.
-
checkMultiplicity
protected boolean checkMultiplicity(java.lang.Object id, OAVAttributeType attribute, java.lang.String allowedmult)
Ensure that multiplicity is ok.- Parameters:
id
- The object (oid).attribute
- The attribute.multiplicity
- The multiplicity.- Throws:
java.lang.RuntimeException
- if value is not allowed.
-
checkTypeDefined
protected boolean checkTypeDefined(OAVObjectType type)
Test if a type is defined in one of the models.- Parameters:
type
- The type.- Returns:
- True, if is defined.
-
checkValidStateObject
protected boolean checkValidStateObject(java.lang.Object id)
Test if the object is a valid state object (oid).- Parameters:
id
- The object (oid).- Returns:
- True, if valid.
-
checkValidStateObjectRead
protected 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.- Parameters:
id
- The object (oid).- Returns:
- True, if valid.
-
checkValidStateValue
protected boolean checkValidStateValue(java.lang.Object value)
Test if the object is a valid state value, meaning that is either a state object or a java value.- Parameters:
value
- The value.- Returns:
- True, if valid.
-
addObjectUsage
protected void addObjectUsage(java.lang.Object whichid, OAVAttributeType whichattr, java.lang.Object value)
Add an object (oid of java object) usage. For each occurrence of an object in a multi attribute a separate reference is added.- Parameters:
whichid
- The object (oid) that references the value.whichattr
- The attribute which references the object.value
- The value (id of the referenced object or java object).
-
removeObjectUsage
protected void removeObjectUsage(java.lang.Object whichid, OAVAttributeType whichattr, java.lang.Object value, java.util.Set dropset, boolean keepalive)
Remove an object (oid or java object) usage.- Parameters:
whichid
- The object that references the value.whichattr
- The attribute which references the value.value
- The object id/java value to remove.dropset
- Already dropped objects in recursive drop (or null if none).keepalive
- A flag indicating that at least one object in the path is externally referenced (all contained unused objects are set to externally referenced, too).
-
isManaged
protected boolean isManaged(java.lang.Object value)
Check if a value (oid or java object) is managed by the state. Returns true for attribute values which are directly contained oav objects or mutable java objects, e.g. not simple values such as strings or intergers.
-
getObjectUsages
protected java.util.Map getObjectUsages(java.lang.Object object)
Get all object usages.- Returns:
- The usages for an object (oid or java object).
-
registerValue
protected void registerValue(OAVJavaType type, java.lang.Object value)
Register a value for observation. If its an expression then add the action, if its a bean then add the property listener.
-
deregisterValue
protected void deregisterValue(OAVJavaType type, java.lang.Object value)
Deregister a value for observation. If its an expression then clear the action, if its a bean then remove the property listener.
-
isExternallyUsed
protected abstract boolean isExternallyUsed(java.lang.Object id)
Test if an object is externally used.- Parameters:
id
- The id.- Returns:
- True, if externally used.
-
addSubstate
public void addSubstate(IOAVState substate)
Add a substate. Read accesses will be transparently mapped to substates. Write accesses to substates need not be supported and may generate UnsupportedOperationException.- Specified by:
addSubstate
in interfaceIOAVState
-
getSubstates
public IOAVState[] getSubstates()
Get the substates.- Specified by:
getSubstates
in interfaceIOAVState
-
isJavaIdentity
public boolean isJavaIdentity()
Flag indicating that java objects are stored by identity instead of equality.- Specified by:
isJavaIdentity
in interfaceIOAVState
-
equals
public boolean equals(java.lang.Object a, java.lang.Object b)
Test if two values are equal according to current identity/equality settings.
-
internalCreateObject
protected abstract java.util.Map internalCreateObject(java.lang.Object id)
Internally create an object.- Parameters:
id
- The id.- Returns:
- The content map of the new object.
-
internalRemoveObject
protected abstract java.util.Map internalRemoveObject(java.lang.Object id)
Remove an object from the state objects.- Parameters:
id
- The id.- Returns:
- The content map of the object.
-
internalGetObjectContent
protected abstract java.util.Map internalGetObjectContent(java.lang.Object id)
Get the object content of an object.- Parameters:
id
- The id.- Returns:
- The content map of the object.
-
internalContainsObject
protected abstract boolean internalContainsObject(java.lang.Object id)
Test if an object is contained in the state.- Parameters:
id
- The id.- Returns:
- True, if object is contained.
-
internalObjectsSize
protected abstract int internalObjectsSize()
Test how many object are contained in the state.- Returns:
- The number of objects.
-
internalGetObjects
protected abstract java.util.Set internalGetObjects()
Get a set of the internal state objects.- Returns:
- A set of the state objects.
-
-