|
OSGi Service Platform Release 3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.osgi.util.measurement.State
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.
Constructor Summary | |
---|---|
State(int value,
java.lang.String name)
Create a new State object with a time of 0. |
|
State(int value,
java.lang.String name,
long time)
Create a new State object. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
Return whether the specified object is equal to this object. |
java.lang.String |
getName()
Returns the name of this State. |
long |
getTime()
Returns the time with which this State was created. |
int |
getValue()
Returns the value of this State. |
int |
hashCode()
Returns a hash code value for this object. |
java.lang.String |
toString()
Returns a String object representing this object. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public State(int value, java.lang.String name, long time)
value
- The value of the state.name
- The name of the state.time
- The time measured in milliseconds since midnight, January 1, 1970 UTC.public State(int value, java.lang.String name)
value
- The value of the state.name
- The name of the state.Method Detail |
public final int getValue()
public final long getTime()
public final java.lang.String getName()
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- The object to compare with this object.
|
OSGi Service Platform Release 3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |