|
OSGi™ Service Platform Release 4 Version 4.2 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.osgi.util.measurement.State
public class 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)
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.public State(int value, java.lang.String name)
State
object with a time of 0.
value
- The value of the state.name
- The name of the state.Method Detail |
---|
public final int getValue()
State
.
State
object.public final long getTime()
State
was created.
State
was created. The time
is measured in milliseconds since midnight, January 1, 1970 UTC.public final java.lang.String getName()
State
.
State
object.public java.lang.String toString()
String
object representing this object.
toString
in class java.lang.Object
String
object representing this object.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
State
objects are equal if they have same value and name.
equals
in class java.lang.Object
obj
- The object to compare with this object.
true
if this object is equal to the specified object;
false
otherwise.
|
OSGi™ Service Platform Release 4 Version 4.2 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |