public class AttributeChangedEvent extends NamedEvent
Streamable.Closure| Constructor and Description |
|---|
AttributeChangedEvent(int targetOid,
String name,
Object value)
Constructs a new attribute changed event on the specified target object with the supplied
attribute name and value.
|
| 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.
|
byte |
getByteValue()
Returns the new value of the attribute as a byte.
|
double |
getDoubleValue()
Returns the new value of the attribute as a double.
|
float |
getFloatValue()
Returns the new value of the attribute as a float.
|
int |
getIntValue()
Returns the new value of the attribute as an int.
|
long |
getLongValue()
Returns the new value of the attribute as a long.
|
Object |
getOldValue()
Returns the value of the attribute prior to the application of this event.
|
short |
getShortValue()
Returns the new value of the attribute as a short.
|
Object |
getValue()
Returns the new value of the attribute.
|
getNamegetActualTransport, getSourceOid, getTargetOid, getTransport, isPrivate, noteActualTransport, setSourceOid, setTargetOid, setTransport, toStringpublic AttributeChangedEvent(int targetOid,
String name,
Object value)
DObject.changeAttribute(java.lang.String, java.lang.Object) instead.targetOid - the object id of the object whose attribute has changed.name - the name of the attribute (data member) that has changed.value - the new value of the attribute (in the case of primitive types, the
reflection-defined object-alternative is used).public Object getValue()
public Object getOldValue()
public byte getByteValue()
public short getShortValue()
public int getIntValue()
public long getLongValue()
public float getFloatValue()
public double getDoubleValue()
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.