com.isti.trinetwatch.params
Class DynamicParameter

java.lang.Object
  extended by com.isti.trinetwatch.params.DynamicParameter
All Implemented Interfaces:
java.io.Serializable

public class DynamicParameter
extends java.lang.Object
implements java.io.Serializable

Class DynamicParameter defines dynamic objects. These may be updated at any time from a collection agent; are held by the server; and may be passed to a GUI.

See Also:
Serialized Form

Constructor Summary
DynamicParameter(java.lang.String name, java.lang.Object data)
          Constructor which initializes values.
 
Method Summary
 int compareTo(java.lang.Object obj)
          Compares this object with the specified object 'obj'.
 boolean dataEquals(java.lang.Object obj)
          Returns true if this parameter's data object equals the given object or if both objects are null.
 java.lang.Object getData()
          Returns data object.
 java.lang.String getName()
          Returns parameter name.
 void setData(java.lang.Object obj)
          Sets data object.
 java.lang.String toString()
          Returns string representation of data object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DynamicParameter

public DynamicParameter(java.lang.String name,
                        java.lang.Object data)
Constructor which initializes values.

Parameters:
name - name of parameter.
data - data object, such as Integer, Double, String, etc.
Method Detail

getName

public java.lang.String getName()
Returns parameter name.


getData

public java.lang.Object getData()
Returns data object.


setData

public void setData(java.lang.Object obj)
Sets data object.

Parameters:
obj - data object, such as Integer, Double, String, etc.

dataEquals

public boolean dataEquals(java.lang.Object obj)
Returns true if this parameter's data object equals the given object or if both objects are null.


toString

public java.lang.String toString()
Returns string representation of data object.

Overrides:
toString in class java.lang.Object

compareTo

public int compareTo(java.lang.Object obj)
Compares this object with the specified object 'obj'. The 'data' field of this object is compared to the numeric representation of the specified object 'obj', as defined by its 'compareTo()' function.

Parameters:
obj - an object to compare to.
Returns:
A negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
Throws:
java.lang.ClassCastException - if the specified object's type prevents it from being compared to this object.