public class SymbolElement extends AbstractElement
| Modifier and Type | Field and Description |
|---|---|
static ElementType |
TYPE
The BSON type for a symbol.
|
ELEMENT_TYPE| Constructor and Description |
|---|
SymbolElement(String name,
String symbol)
Constructs a new
SymbolElement. |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(Visitor visitor)
Accepts the visitor and calls the
Visitor.visitSymbol(java.lang.String, java.lang.String) 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.
|
String |
getSymbol()
Returns the BSON symbol value.
|
ElementType |
getType()
Returns the type for the BSON type.
|
int |
hashCode()
Computes a reasonable hash code.
|
String |
toString()
String form of the object.
|
SymbolElement |
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 SymbolElement(String name, String symbol)
SymbolElement.name - The name for the BSON string.symbol - The BSON symbol value.public void accept(Visitor visitor)
Visitor.visitSymbol(java.lang.String, java.lang.String) 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 String getSymbol()
public ElementType getType()
public int hashCode()
hashCode in class AbstractElementpublic String toString()
toString in class AbstractElementObject.toString()public SymbolElement withName(String name)
Returns a new SymbolElement.
name - The new name for the element.Copyright © 2011-2012 Allanbank Consulting, Inc.. All Rights Reserved.