com.threerings.presents.dobj
Class EntryEvent<T extends DSet.Entry>
java.lang.Object
com.threerings.presents.dobj.DEvent
com.threerings.presents.dobj.NamedEvent
com.threerings.presents.dobj.EntryEvent<T>
- All Implemented Interfaces:
- Streamable
- Direct Known Subclasses:
- EntryAddedEvent, EntryRemovedEvent, EntryUpdatedEvent
public abstract class EntryEvent<T extends DSet.Entry>
- extends NamedEvent
A common parent class for DSet entry events.
|
Constructor Summary |
EntryEvent(int targetOid,
String name)
Constructs a new event for the specified target object with the supplied attribute name. |
|
Method Summary |
abstract T |
getEntry()
Return the new or updated entry, or null if the entry was removed. |
abstract Comparable<?> |
getKey()
Return the key that identifies the entry related to this event. |
abstract T |
getOldEntry()
Return the old entry, or null if the entry is newly added. |
| Methods inherited from class com.threerings.presents.dobj.DEvent |
alreadyApplied, applyToObject, getActualTransport, getSourceOid, getTargetOid, getTransport, isPrivate, noteActualTransport, notifyListener, setSourceOid, setTargetOid, setTransport, toString |
EntryEvent
public EntryEvent(int targetOid,
String name)
- Constructs a new event for the specified target object with the supplied attribute name.
- Parameters:
targetOid - the object id of the object in question.name - the name associated with this event.
getKey
public abstract Comparable<?> getKey()
- Return the key that identifies the entry related to this event.
Never returns
null.
getEntry
public abstract T getEntry()
- Return the new or updated entry, or
null if the entry was removed.
getOldEntry
public abstract T getOldEntry()
- Return the old entry, or
null if the entry is newly added.