|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.javamud.core.MudObject
Base object for all objects in the MUD
Field Summary | |
ACL |
acl
Access Control List. |
protected MudObject |
container
Parent container. |
protected Set |
contains
Set of MudObjects that this contains. |
protected String |
identity
Unique identity for this |
protected long |
minLife
Temporary object may not be expired before this time. |
Set |
referances
MudObjects that refer to this MudObject |
Constructor Summary | |
MudObject()
Constructor for the MudObject object. |
Method Summary | |
boolean |
canExpire()
Can this object be expire d?. |
int |
compareTo(Object o)
Implementation of Comparable.compareTo |
void |
deRef(MudObject o)
Remove any referance to o. |
MudObject |
enter(MudObject entering)
Called it indicate entering if moving in to this MudObject. |
boolean |
exit(MudObject exiting)
Remove a MudObject from this one. |
boolean |
expire()
Clean up object ready for dereferancing. |
String |
getIdentity()
Gets the identity attribute of the MudObject object |
void |
load(Storage store)
Reforms this MudObject from the given data store. |
void |
replace(MudObject o,
MudObject n)
Replace o with n |
PersistentObject |
save(Storage store)
Saves this MudObject into a data store ready for serialization. |
void |
setIdentity(String identity)
Unique Identity of this. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public ACL acl
public Set referances
protected MudObject container
protected Set contains
protected String identity
protected long minLife
Constructor Detail |
public MudObject()
Method Detail |
public boolean canExpire()
expire
d?. Will return true if minLife
> 0 and Globals.globals
.ticks
>
minLife
and referances
.size() <= 1.
public int compareTo(Object o) throws ClassCastException
compareTo
in interface Comparable
o
- Object to compare to
ClassCastException
- If o is not a MudObjectpublic void deRef(MudObject o)
o
- a MudObject to dereferance.public MudObject enter(MudObject entering)
entering
- Object that is entering this room.
public boolean exit(MudObject exiting)
enter(MudObject)
.
exiting
- MudObject that is leaving this container.
public boolean expire()
public String getIdentity()
public void load(Storage store)
store
- Description of the Parameterpublic void replace(MudObject o, MudObject n)
o
- Old MudObjectn
- New MudObjectpublic PersistentObject save(Storage store)
store
- Storage object
public void setIdentity(String identity) throws DuplicateIdentityException
identity
- The new identity
value
DuplicateIdentityException
- Thrown by
Globals.globals.linker.register(this)
.Linker.register(MudObject)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |