Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Project Rio
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jini.rio.watch
Class Calculable

    java.lang.Object
      org.jini.rio.watch.Calculable

All Implemented Interfaces:
  Serializable

Direct Known Subclasses:
  CalculableDiskSpace, CalculableMemory

    public class Calculable

extends Object
implements Serializable

A Calculable is the atomic attribute that is being 'watched'

See Also:
  Serialized Form

Field Summary
`protected String` | `id` The identifier for the Calculable
`protected double` | `value` The value for the Calculable
`protected long` | `when` Holds value of property when, indicates when the Calculable was recorded

Constructor Summary
`Calculable()` Create a new Calculable
`Calculable(String id, double value)` Create a new Calculable that records the time
`Calculable(String id, double value, long when)` Create a new Calculable

Method Summary
`boolean` | `equals(Object obj)` Indicates whether some other object is "equal to" this one.
`String` | `getArchiveRecord()` Gets an archival representation for this Calculable
`String` | `getId()` Getter for property id
`double` | `getValue()` Getter for property value.
`long` | `getWhen()` Getter for property when.
`int` | `hashCode()` Returns a hash code value for the object.
`void` | `setId(String id)` Setter for property id
`void` | `setValue(double value)` Setter for property value.
`void` | `setWhen(long when)` Setter for property when.
`String` | `toString()` Returns a string representation of the object.

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### id

    protected String id

  The identifier for the Calculable

### value

    protected double value

  The value for the Calculable

### when

    protected long when

  Holds value of property when, indicates when the Calculable was recorded

Constructor Detail

### Calculable

    public Calculable()

  Create a new Calculable

### Calculable

    public Calculable(String id,
                      double value)

  Create a new Calculable that records the time

  Parameters:
    `id` - The identifier for the Calculable
    `value` - The value for the Calculable

### Calculable

    public Calculable(String id,
                      double value,
                      long when)

  Create a new Calculable

  Parameters:
    `id` - The identifier for this Calculable record
    `value` - The value for the Calculable Record
    `when` - The time when the recorded value was captured

Method Detail

### getId

    public String getId()

  Getter for property id

  Returns:
    Value of property id.

### setId

    public void setId(String id)

  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

    public boolean equals(Object obj)

  Indicates whether some other object is "equal to" this one.

  Overrides:
    `equals` in class `Object`
  Parameters:
    `obj` - the object to compare to this one
  Returns:
    true if the objects are equal

### hashCode

    public int hashCode()

  Returns a hash code value for the object.

  Overrides:
    `hashCode` in class `Object`
  Returns:
    a hash code value for the object.

### getArchiveRecord

    public String getArchiveRecord()

  Gets an archival representation for this Calculable

  Returns:
    a string representation in archive format

### toString

    public String toString()

  Returns a string representation of the object.

  Overrides:
    `toString` in class `Object`
  Returns:
    String representation of the object.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Project Rio
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © Project Rio.