Package org.jini.rio.watch
Class Calculable
java.lang.Object
org.jini.rio.watch.Calculable
- All Implemented Interfaces:
Serializable
A Calculable implements support required by the Calculable interface
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new CalculableCalculable(String id, double value) Create a new Calculable that records the timeCalculable(String id, double value, long when) Create a new Calculable -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.Gets an archival representation for this CalculablegetId()Getter for property iddoublegetValue()Getter for property value.longgetWhen()Getter for property when.inthashCode()Returns a hash code value for the object.voidSetter for property idvoidsetValue(double value) Setter for property value.voidsetWhen(long when) Setter for property when.toString()Returns a string representation of the object.
-
Field Details
-
id
The identifier for the Calculable -
value
protected double valueThe value for the Calculable -
when
protected long whenHolds value of property when, which indicates when the Calculable was recorded
-
-
Constructor Details
-
Calculable
public Calculable()Create a new Calculable -
Calculable
Create a new Calculable that records the time- Parameters:
id- The identifier for the Calculablevalue- The value for the Calculable
-
Calculable
Create a new Calculable- Parameters:
id- The identifier for this Calculable recordvalue- The value for the Calculable Recordwhen- The time when the recorded value was captured
-
-
Method Details
-
getId
Getter for property id- Returns:
- Value of property id.
-
setId
Setter for property id- Parameters:
id- New value of property id.
-
getValue
public double getValue()Getter for property value.- Returns:
- Value of property value.
-
setValue
public void setValue(double value) Setter for property value.- Parameters:
value- New value of property value.
-
getWhen
public long getWhen()Getter for property when.- Returns:
- Value of property when.
-
setWhen
public void setWhen(long when) Setter for property when.- Parameters:
when- New value of property when.
-
equals
Indicates whether some other object is "equal to" this one. -
hashCode
public int hashCode()Returns a hash code value for the object. -
getArchiveRecord
Gets an archival representation for this Calculable- Returns:
- a string representation in archive format
-
toString
Returns a string representation of the object.
-