com.threerings.delta
Class ReflectiveDelta.FinalFieldHandler

java.lang.Object
  extended by com.threerings.delta.ReflectiveDelta.FieldHandler
      extended by com.threerings.delta.ReflectiveDelta.FinalFieldHandler
Enclosing class:
ReflectiveDelta

protected abstract static class ReflectiveDelta.FinalFieldHandler
extends ReflectiveDelta.FieldHandler

Base class for final field handlers.


Constructor Summary
protected ReflectiveDelta.FinalFieldHandler()
           
 
Method Summary
 void populate(Field field, Object original, Object revised, ArrayMask mask, MutableInteger midx, List<Object> values)
          Compares the field in the original and revised objects and, if they differ, populates the supplied mask and values list with the delta values.
 void read(ArrayMask mask, MutableInteger midx, List<Object> values, ObjectInputStream in)
          Reads the delta value for the field (if any) from the stream.
 void toString(Field field, ArrayMask mask, MutableInteger midx, Object[] values, MutableInteger vidx, StringBuilder buf)
          Writes the delta value (if any) to the specified string.
 void write(ArrayMask mask, MutableInteger midx, Object[] values, MutableInteger vidx, ObjectOutputStream out)
          Writes the delta value for the field (if any) to the stream.
 
Methods inherited from class com.threerings.delta.ReflectiveDelta.FieldHandler
apply
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReflectiveDelta.FinalFieldHandler

protected ReflectiveDelta.FinalFieldHandler()
Method Detail

populate

public void populate(Field field,
                     Object original,
                     Object revised,
                     ArrayMask mask,
                     MutableInteger midx,
                     List<Object> values)
Description copied from class: ReflectiveDelta.FieldHandler
Compares the field in the original and revised objects and, if they differ, populates the supplied mask and values list with the delta values.

Specified by:
populate in class ReflectiveDelta.FieldHandler
midx - an in/out parameter representing the index in the mask.

write

public void write(ArrayMask mask,
                  MutableInteger midx,
                  Object[] values,
                  MutableInteger vidx,
                  ObjectOutputStream out)
Description copied from class: ReflectiveDelta.FieldHandler
Writes the delta value for the field (if any) to the stream.

Specified by:
write in class ReflectiveDelta.FieldHandler
midx - an in/out parameter representing the index in the mask.
vidx - an in/out parameter representing the index in the value array.

read

public void read(ArrayMask mask,
                 MutableInteger midx,
                 List<Object> values,
                 ObjectInputStream in)
Description copied from class: ReflectiveDelta.FieldHandler
Reads the delta value for the field (if any) from the stream.

Specified by:
read in class ReflectiveDelta.FieldHandler
midx - an in/out parameter representing the index in the mask.

toString

public void toString(Field field,
                     ArrayMask mask,
                     MutableInteger midx,
                     Object[] values,
                     MutableInteger vidx,
                     StringBuilder buf)
Description copied from class: ReflectiveDelta.FieldHandler
Writes the delta value (if any) to the specified string.

Overrides:
toString in class ReflectiveDelta.FieldHandler
midx - an in/out parameter representing the index in the mask.
vidx - an in/out parameter representing the index in the value array.