|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectch.ethz.iks.r_osgi.types.Timestamp
public final class Timestamp
Encapsulates a timestamp that can be used as attribute for a service or as part of a RemoteEvent. Timestamps consist of a physical clock timestamp and a logical time to avoid ambiguity. (Especially, if more than one event is generated within a physical tick, which is typically 50 ms on desktop computers but may be larger on small devices)
Timestamps are automatically transformed into local time whenever a RemoteEvent is received by a peer or a proxy bundle with a Timestamp attribute is generated.
| Constructor Summary | |
|---|---|
Timestamp()
creates an new Timestamp object with the current time. |
|
| Method Summary | |
|---|---|
int |
compareTo(java.lang.Object o)
compares this instance with an Object. |
boolean |
equals(java.lang.Object o)
Checks, if this instance equals another Timestamp. |
static Timestamp |
from(long timestamp)
Get a Timestamp object from long. |
static Timestamp |
fromString(java.lang.String timestamp)
Get a Timestamp object from String. |
long |
getValue()
Get the long value of the Timestamp instance. |
int |
hashCode()
Get the hash code of the timestamp. |
java.lang.String |
toString()
get a String representation of the instance. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Timestamp()
| Method Detail |
|---|
public int compareTo(java.lang.Object o)
Object.
compareTo in interface java.lang.Comparableo - the Object to be compared.
Comparable.compareTo(Object)public java.lang.String toString()
String representation of the instance.
toString in class java.lang.ObjectString representation.public static Timestamp fromString(java.lang.String timestamp)
String.
timestamp - the String representation of a timestamp.
public static Timestamp from(long timestamp)
long.
timestamp - the long representing a timestamp.
public long getValue()
long value of the Timestamp instance.
long value.public boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - an Object. If not instance of
Timestamp, false is returned.>
public int hashCode()
hashCode in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||