org.bson.types
Class BSONTimestamp

java.lang.Object
  extended by org.bson.types.BSONTimestamp
All Implemented Interfaces:
Serializable, Comparable<BSONTimestamp>

public class BSONTimestamp
extends Object
implements Comparable<BSONTimestamp>, Serializable

this is used for internal increment values. for storing normal dates in MongoDB, you should use java.util.Date time is seconds since epoch inc is an ordinal

See Also:
Serialized Form

Constructor Summary
BSONTimestamp()
           
BSONTimestamp(int time, int inc)
           
 
Method Summary
 int compareTo(BSONTimestamp ts)
           
 boolean equals(Object obj)
           
 int getInc()
           
 int getTime()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BSONTimestamp

public BSONTimestamp()

BSONTimestamp

public BSONTimestamp(int time,
                     int inc)
Method Detail

getTime

public int getTime()
Returns:
get time in seconds since epoch

getInc

public int getInc()

toString

public String toString()
Overrides:
toString in class Object

compareTo

public int compareTo(BSONTimestamp ts)
Specified by:
compareTo in interface Comparable<BSONTimestamp>

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object