public class DeltaTracker<O extends IMutableObject> extends java.lang.Object implements IMutableObject
Constructor and Description |
---|
DeltaTracker(ISimulationObject object) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
compareBooleans(boolean[] one,
boolean[] two) |
protected boolean |
compareDoubles(double[] one,
double[] two) |
protected boolean |
compareFloats(float[] one,
float[] two) |
protected boolean |
compareInts(int[] one,
int[] two) |
O |
get() |
ObjectDelta |
getDelta() |
ObjectDelta |
getDelta(boolean clearProperties)
compute the object delta for this tracker by actually iterating through the
properties and comparing them to the actual object.
|
IIdentifier |
getIdentifier() |
java.util.Collection<java.lang.String> |
getProperties() |
java.lang.Object |
getProperty(java.lang.String keyName) |
java.util.Map<java.lang.String,java.lang.Object> |
getPropertyMap() |
boolean |
hasChanged() |
boolean |
hasProperty(java.lang.String keyName) |
boolean |
setProperty(java.lang.String keyName,
java.lang.Object value) |
public DeltaTracker(ISimulationObject object)
public IIdentifier getIdentifier()
getIdentifier
in interface IIdentifiable
IIdentifiable.getIdentifier()
public O get()
public ObjectDelta getDelta()
public ObjectDelta getDelta(boolean clearProperties)
clearProperties
- public boolean hasChanged()
public boolean setProperty(java.lang.String keyName, java.lang.Object value)
setProperty
in interface IMutableObject
IMutableObject.setProperty(java.lang.String,
java.lang.Object)
public java.lang.Object getProperty(java.lang.String keyName)
getProperty
in interface ISimulationObject
ISimulationObject.getProperty(java.lang.String)
public boolean hasProperty(java.lang.String keyName)
hasProperty
in interface ISimulationObject
ISimulationObject.hasProperty(java.lang.String)
public java.util.Collection<java.lang.String> getProperties()
getProperties
in interface ISimulationObject
public java.util.Map<java.lang.String,java.lang.Object> getPropertyMap()
getPropertyMap
in interface ISimulationObject
protected boolean compareDoubles(double[] one, double[] two)
protected boolean compareFloats(float[] one, float[] two)
protected boolean compareInts(int[] one, int[] two)
protected boolean compareBooleans(boolean[] one, boolean[] two)