com.lightstreamer.javameclient.midp
Class SimpleItemUpdate

java.lang.Object
  extended by com.lightstreamer.javameclient.midp.SimpleItemUpdate
Direct Known Subclasses:
ExtendedItemUpdate, ReusableSimpleItemUpdate

public class SimpleItemUpdate
extends java.lang.Object

Carries any update pertaining to an item. Changed and unchanged values are distinguished. This object is not reused by LSClient, so it can be freely stored by the application.


Method Summary
 java.lang.String getFieldNewValue(int numField)
          Inquiry method that gets the new value for a specified field, as received from the Server with the current update or SimpleTableListener.UNCHANGED if the field is not changed.
 int getNumFields()
          Inquiry method that gets the number of fields received from the Server with the current update.
 boolean isFieldChanged(int numField)
          Inquiry method that asks whether the value for a field is changed after the reception of an update from the Server for an item.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getNumFields

public int getNumFields()
Inquiry method that gets the number of fields received from the Server with the current update. The value, however, is the same across all updates pertaining to the same item, because it is determined by the schema associated to the item at subscription time. The fields received from the Server are always associated to consecutive field numbers starting from 1.

Returns:
The number of fields received from the Server.

getFieldNewValue

public java.lang.String getFieldNewValue(int numField)
Inquiry method that gets the new value for a specified field, as received from the Server with the current update or SimpleTableListener.UNCHANGED if the field is not changed.

Parameters:
numField - 1-based index of the field.
Returns:
SimpleTableListener.UNCHANGED if the value is unchanged, the received value otherwise.

isFieldChanged

public boolean isFieldChanged(int numField)
Inquiry method that asks whether the value for a field is changed after the reception of an update from the Server for an item.

Parameters:
numField - 1-based index of the field.
Returns:
true if the value is changed; false otherwise.