public class MongoTimestampElement extends AbstractElement
| Modifier and Type | Field and Description |
|---|---|
static ElementType |
TYPE
The BSON type for a long.
|
ELEMENT_TYPE| Constructor and Description |
|---|
MongoTimestampElement(String name,
long value)
Constructs a new
MongoTimestampElement. |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(Visitor visitor)
Accepts the visitor and calls the
Visitor.visitMongoTimestamp(java.lang.String, long)
method. |
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 |
getTime()
Returns the BSON Mongo timestamp value as 4 byte increment and 4 byte
timestamp.
|
ElementType |
getType()
Returns the type for the BSON type.
|
int |
hashCode()
Computes a reasonable hash code.
|
String |
toString()
String form of the object.
|
MongoTimestampElement |
withName(String name)
Creates a new element with the same type and value as this element but
with the specified name.
|
asElement, find, find, findFirst, findFirst, getName, nullSafeEquals, queryPath, queryPathpublic static final ElementType TYPE
public MongoTimestampElement(String name, long value)
MongoTimestampElement.name - The name for the BSON long.value - The BSON timestamp value as 4 byte increment and 4 byte
timestamp.public void accept(Visitor visitor)
Visitor.visitMongoTimestamp(java.lang.String, long)
method.visitor - The visitor for the element.Element.accept(Visitor)public boolean equals(Object object)
equals in class AbstractElementobject - The object to compare to.Object.equals(java.lang.Object)public long getTime()
public ElementType getType()
public int hashCode()
hashCode in class AbstractElementpublic String toString()
toString in class AbstractElementObject.toString()public MongoTimestampElement withName(String name)
Returns a new MongoTimestampElement.
name - The new name for the element.Copyright © 2011-2012 Allanbank Consulting, Inc.. All Rights Reserved.