public class BeaconTuple extends java.lang.Object implements java.io.Serializable, Keyable<java.lang.Long>, java.lang.Comparable<BeaconTuple>, JSONAble
BeaconStreams
,
Serialized FormConstructor and Description |
---|
BeaconTuple(long sequence,
long time)
Create a BeaconTuple.
|
BeaconTuple(long sequence)
Create a BeaconTuple with the current time.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(BeaconTuple o) |
boolean |
equals(java.lang.Object obj) |
java.lang.Long |
getKey()
Get the key (sequence identifier) of this tuple.
|
long |
getSequence()
Get the sequence identifier of this tuple.
|
long |
getTime()
Get the time of this tuple.
|
int |
hashCode() |
com.ibm.json.java.JSONObject |
toJSON()
|
java.lang.String |
toString() |
public BeaconTuple(long sequence)
sequence
- Sequence of the tuplepublic BeaconTuple(long sequence, long time)
sequence
- Sequence of the tupletime
- time of the tuplepublic long getSequence()
public java.lang.Long getKey()
getKey
in interface Keyable<java.lang.Long>
getSequence()
public long getTime()
public com.ibm.json.java.JSONObject toJSON()
sequence
Value of getSequence()
time
Value of getTime()
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
public int compareTo(BeaconTuple o)
compareTo
in interface java.lang.Comparable<BeaconTuple>