com.threerings.presents.dobj
Class EntryEvent<T extends DSet.Entry>

java.lang.Object
  extended by com.threerings.presents.dobj.DEvent
      extended by com.threerings.presents.dobj.NamedEvent
          extended by 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.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.threerings.io.Streamable
Streamable.Closure
 
Field Summary
 
Fields inherited from class com.threerings.presents.dobj.NamedEvent
_name
 
Fields inherited from class com.threerings.presents.dobj.DEvent
_actualTransport, _soid, _toid, _transport, eventId, UNSET_OLD_ENTRY, UNSET_OLD_VALUE
 
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.NamedEvent
getName, toString
 
Methods inherited from class com.threerings.presents.dobj.DEvent
alreadyApplied, applyToObject, getActualTransport, getSourceOid, getTargetOid, getTransport, isPrivate, noteActualTransport, notifyListener, setSourceOid, setTargetOid, setTransport, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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.
Method Detail

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.