|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuka.util.IDConstants
uka.transport.ObjectSpaceAdapter
uka.transport.ReadOnlyObjectSpace
An object space adapter behaves exactly like the original object space passed to its constructor.
| Field Summary |
| Fields inherited from class uka.transport.ObjectSpaceAdapter |
original |
| Fields inherited from class uka.util.IDConstants |
FIRST_NEW_ID, FIRST_VALID_ID, INVALID_ID, UNUSED_ID |
| Constructor Summary | |
ReadOnlyObjectSpace(ObjectSpace original)
|
|
| Method Summary | |
void |
clear()
Clears the object space by removing all identifier assignments. |
int |
getID(java.lang.Object obj)
Returns the identifier for a given object. |
ObjectSpace |
getOriginal()
|
void |
includeID(int id)
Make the object that corresponds to the given identifier part of this object space. |
void |
remove(int id)
Removes the given identifer from this object space. |
void |
resetObject(int id,
java.lang.Object obj)
Reassigns a new object to an existing identifier. |
void |
setObject(int id,
java.lang.Object obj)
Assigns the given object to an application provided identifier and includes the given object to this object
space. |
| Methods inherited from class uka.transport.ObjectSpaceAdapter |
findID, getObject, getUsedIDs, isAccepted, isIncluded, isShared, isUsed |
| Methods inherited from class uka.util.IDConstants |
isNew, isValid, normalizeID, toggleNew |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ReadOnlyObjectSpace(ObjectSpace original)
| Method Detail |
public final ObjectSpace getOriginal()
getOriginal in class ObjectSpaceAdapterpublic int getID(java.lang.Object obj)
ObjectSpaceObjectSpace the first time, the #isNew method returns true for the resulting
identifier.
getID in interface ObjectSpacegetID in class ObjectSpaceAdapter
public void setObject(int id,
java.lang.Object obj)
ObjectSpaceincludes the given object to this object
space.
setObject in interface ObjectSpacesetObject in class ObjectSpaceAdapter
public void resetObject(int id,
java.lang.Object obj)
ObjectSpaceremoving the identifier first and
then reassigning it with ObjectSpace.setObject(int, java.lang.Object). Since
ObjectSpace.setObject(int, java.lang.Object) may be overridden in subclasses to handle
the first assignment of an identifier especially, ObjectSpace.resetObject(int, java.lang.Object) can be used to avoid additional calls to ObjectSpace.setObject(int, java.lang.Object).
resetObject in interface ObjectSpaceresetObject in class ObjectSpaceAdapterpublic void remove(int id)
ObjectSpaceObjectSpace.getID(java.lang.Object) with the object corresponding to the given
identifier as argument will result in a new
identifier.
remove in interface ObjectSpaceremove in class ObjectSpaceAdapterpublic void clear()
ObjectSpace
clear in interface ObjectSpaceclear in class ObjectSpaceAdapterpublic void includeID(int id)
ObjectSpaceObjectSpace.isIncluded(int) method returns true for the
corresponding identifier. An object can have an assigned
identifier in some object space without being part of that
object space.
includeID in interface ObjectSpaceincludeID in class ObjectSpaceAdapter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||