public class ObjectId extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
static long |
MACHINE_ID
The current process's machine id.
|
Constructor and Description |
---|
ObjectId()
Constructs a new
ObjectId . |
ObjectId(int timestamp,
long machineId)
Constructs a new
ObjectId . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object object)
Determines if the passed object is of this same type as this object and
if so that its fields are equal.
|
long |
getMachineId()
The lower 8 bytes of the object id.
|
int |
getTimestamp()
The upper 4 bytes of the object id.
|
int |
hashCode()
Computes a reasonable hash code.
|
String |
toString()
String form of the object.
|
public ObjectId()
ObjectId
.public ObjectId(int timestamp, long machineId)
ObjectId
.timestamp
- The BSON Object Id timestamp.machineId
- The BSON Object Id machine id.public boolean equals(Object object)
equals
in class Object
object
- The object to compare to.Object.equals(java.lang.Object)
public long getMachineId()
public int getTimestamp()
public int hashCode()
public String toString()
toString
in class Object
Object.toString()
Copyright © 2011-2013 Allanbank Consulting, Inc.. All Rights Reserved.