java.lang.Object
org.osgi.util.measurement.State

public class State extends Object
Groups a state name, value and timestamp.

The state itself is represented as an integer and the time is measured in milliseconds since midnight, January 1, 1970 UTC.

A State object is immutable so that it may be easily shared.

  • ???????

    • State

      public State(int value, String name, long time)
      Create a new State object.
      ??:
      value - The value of the state.
      name - The name of the state.
      time - The time measured in milliseconds since midnight, January 1, 1970 UTC.
    • State

      public State(int value, String name)
      Create a new State object with a time of 0.
      ??:
      value - The value of the state.
      name - The name of the state.
  • ??????

    • getValue

      public final int getValue()
      Returns the value of this State.
      ??:
      The value of this State object.
    • getTime

      public final long getTime()
      Returns the time with which this State was created.
      ??:
      The time with which this State was created. The time is measured in milliseconds since midnight, January 1, 1970 UTC.
    • getName

      public final String getName()
      Returns the name of this State.
      ??:
      The name of this State object.
    • toString

      public String toString()
      Returns a String object representing this object.
      ??:
      toString ??? Object
      ??:
      a String object representing this object.
    • hashCode

      public int hashCode()
      Returns a hash code value for this object.
      ??:
      hashCode ??? Object
      ??:
      A hash code value for this object.
    • equals

      public boolean equals(Object obj)
      Return whether the specified object is equal to this object. Two State objects are equal if they have same value and name.
      ??:
      equals ??? Object
      ??:
      obj - The object to compare with this object.
      ??:
      true if this object is equal to the specified object; false otherwise.