|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.javamud.data.MORegistry
MudObject Registry
Nested Class Summary | |
private class |
MORegistry.MORIterator
Iterator for MORegistry |
Field Summary | |
private Map |
bwdMap
Backward Map - MudObject->Identity |
private Map |
fwdMap
Forward Map - Identity->MudObject |
Constructor Summary | |
MORegistry()
Constructor for the MORegistry object |
Method Summary | |
void |
add(MudObject object)
Add a MudObject to registry. |
boolean |
contains(MudObject object)
Return true if registry contains the MudObject. |
boolean |
contains(String identity)
Returns true if registry contains the MudObject identified by identity. |
String |
get(MudObject object)
Get (registered) identity of MudObject |
MudObject |
get(String identity)
Get MudObject associated with identity |
Iterator |
iterator()
Returns an Iterator for this object. |
String |
remove(MudObject object)
Remove object from the registry |
MudObject |
remove(String identity)
Remove identity from the registry |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private Map bwdMap
private Map fwdMap
Constructor Detail |
public MORegistry()
Method Detail |
public MudObject get(String identity)
identity
- Which MudObject to return
public String get(MudObject object)
object
- MudObject to check
public void add(MudObject object) throws DuplicateIdentityException
object
- MudObject to add
DuplicateIdentityException
- Thrown if
object.getIdentity() returns the same as the Identity registered for a
different object.public boolean contains(String identity)
identity
- Item to search for
Set.contains(Object)
public boolean contains(MudObject object)
object
- Item to search for
Set.contains(Object)
public Iterator iterator()
public String remove(MudObject object)
object
- MudObject to remove
public MudObject remove(String identity)
identity
- Identity of MudObject to remove
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |