public class BSONTimestamp extends java.lang.Object implements java.lang.Comparable<BSONTimestamp>, java.io.Serializable
time is seconds
since epoch inc is an ordinal.| Modifier and Type | Field and Description |
|---|---|
(package private) int |
_inc |
(package private) java.util.Date |
_time |
(package private) static boolean |
D |
private static long |
serialVersionUID |
| Constructor and Description |
|---|
BSONTimestamp()
Construct a new instance with a null time and a 0 increment.
|
BSONTimestamp(int time,
int inc)
Construct a new instance for the given time and increment.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(BSONTimestamp ts) |
boolean |
equals(java.lang.Object obj) |
int |
getInc()
Gets the increment value.
|
int |
getTime()
Gets the time in seconds since epoch.
|
int |
hashCode() |
java.lang.String |
toString() |
private static final long serialVersionUID
static final boolean D
final int _inc
final java.util.Date _time
public BSONTimestamp()
public BSONTimestamp(int time,
int inc)
time - the number of seconds since the epochinc - the increment.public int getTime()
public int getInc()
public java.lang.String toString()
toString in class java.lang.Objectpublic int compareTo(BSONTimestamp ts)
compareTo in interface java.lang.Comparable<BSONTimestamp>public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object