public class BSONTimestamp extends Object implements Serializable
Constructor and Description |
---|
BSONTimestamp()
Construct an empty BSONTimestamp.
|
BSONTimestamp(Date date)
Construct BSONTimestamp by java.util.Date.
|
BSONTimestamp(int time,
int inc)
Construct BSONTimestamp.
|
BSONTimestamp(Timestamp timestamp)
Construct BSONTimestamp by java.sql.Timestamp.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Date |
getDate() |
int |
getInc() |
int |
getTime() |
int |
hashCode() |
Date |
toDate() |
String |
toString() |
Timestamp |
toTimestamp() |
public BSONTimestamp()
public BSONTimestamp(Date date)
public BSONTimestamp(int time, int inc)
time
- seconds since epoch.inc
- microseconds in range of [0us, 999999us], while the 'inc' is out of range,
the carry will occur.public BSONTimestamp(Timestamp timestamp)
public Date getDate()
public int getInc()
public int getTime()
public Date toDate()
public Timestamp toTimestamp()
Copyright © 2023. All rights reserved.