public class BooleanElement extends AbstractElement
Modifier and Type | Field and Description |
---|---|
static ElementType |
TYPE
The BSON type for a Object Id.
|
ELEMENT_TYPE
Constructor and Description |
---|
BooleanElement(String name,
boolean value)
Constructs a new
BooleanElement . |
Modifier and Type | Method and Description |
---|---|
void |
accept(Visitor visitor)
Accepts the visitor and calls the
Visitor.visitBoolean(java.lang.String, boolean) 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.
|
ElementType |
getType()
Returns the type for the BSON type.
|
boolean |
getValue()
Returns the BSON boolean value.
|
int |
hashCode()
Computes a reasonable hash code.
|
String |
toString()
String form of the object.
|
BooleanElement |
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, queryPath
public static final ElementType TYPE
public BooleanElement(String name, boolean value)
BooleanElement
.name
- The name for the BSON boolean.value
- The BSON boolean value.public void accept(Visitor visitor)
Visitor.visitBoolean(java.lang.String, boolean)
method.visitor
- The visitor for the element.Element.accept(Visitor)
public boolean equals(Object object)
equals
in class AbstractElement
object
- The object to compare to.Object.equals(java.lang.Object)
public ElementType getType()
public boolean getValue()
public int hashCode()
hashCode
in class AbstractElement
public String toString()
toString
in class AbstractElement
Object.toString()
public BooleanElement withName(String name)
Returns a new BooleanElement
.
name
- The new name for the element.Copyright © 2011-2012 Allanbank Consulting, Inc.. All Rights Reserved.