T - the type of entry being handled by this event. This must match the type on the set
that generated this event.public class EntryRemovedEvent<T extends DSet.Entry> extends EntryEvent<T>
DSet attribute of a
distributed object. It can also be constructed to request the removal of an entry from a set and
posted to the dobjmgr.Streamable.Closure| Constructor and Description |
|---|
EntryRemovedEvent(int targetOid,
String name,
Comparable<?> key)
Constructs a new entry removed event on the specified target object with the supplied set
attribute name and entry key to remove.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
alreadyApplied()
If this event applies itself immediately to the distributed object on the server and then
NOOPs later when
DEvent.applyToObject(com.threerings.presents.dobj.DObject) is called, it should return true from this method. |
boolean |
applyToObject(DObject target)
Applies the attribute modifications represented by this event to the specified target
object.
|
T |
getEntry()
Return the new or updated entry, or
null if the entry was removed. |
Comparable<?> |
getKey()
Return the key that identifies the entry related to this event.
|
T |
getOldEntry()
Return the old entry, or
null if the entry is newly added. |
getNamegetActualTransport, getSourceOid, getTargetOid, getTransport, isPrivate, noteActualTransport, setSourceOid, setTargetOid, setTransport, toStringpublic EntryRemovedEvent(int targetOid,
String name,
Comparable<?> key)
targetOid - the object id of the object from whose set we will remove an entry.name - the name of the attribute from which to remove the specified entry.key - the entry key that identifies the entry to remove.public Comparable<?> getKey()
EntryEventnull.getKey in class EntryEvent<T extends DSet.Entry>public T getEntry()
null if the entry was removed.
This implementation always returns null.getEntry in class EntryEvent<T extends DSet.Entry>public T getOldEntry()
null if the entry is newly added.
This implementation never returns null.getOldEntry in class EntryEvent<T extends DSet.Entry>public boolean alreadyApplied()
DEventDEvent.applyToObject(com.threerings.presents.dobj.DObject) is called, it should return true from this method.
If it will modify the object during its DEvent.applyToObject(com.threerings.presents.dobj.DObject) call, it should return false.alreadyApplied in class DEventpublic boolean applyToObject(DObject target) throws ObjectAccessException
DEventapplyToObject in class DEventObjectAccessException - thrown if there is any problem applying the event to the
object (invalid attribute, etc.).Copyright © 2015. All rights reserved.