public class JavaScriptWithScopeElement extends JavaScriptElement
| Modifier and Type | Field and Description |
|---|---|
static ElementType |
TYPE
The BSON type for a string.
|
ELEMENT_TYPE| Constructor and Description |
|---|
JavaScriptWithScopeElement(String name,
String javaScript,
Document scope)
Constructs a new
JavaScriptWithScopeElement. |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(Visitor visitor)
Accepts the visitor and calls the
Visitor.visitJavaScript(String,String,Document) 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.
|
Document |
getScope()
Returns the BSON JavaScript scope.
|
ElementType |
getType()
Returns the type for the BSON type.
|
int |
hashCode()
Computes a reasonable hash code.
|
String |
toString()
String form of the object.
|
JavaScriptWithScopeElement |
withName(String name)
Creates a new element with the same type and value as this element but
with the specified name.
|
getJavaScriptasElement, find, find, findFirst, findFirst, getName, nullSafeEquals, queryPath, queryPathpublic static final ElementType TYPE
public JavaScriptWithScopeElement(String name, String javaScript, Document scope)
JavaScriptWithScopeElement.name - The name for the BSON string.javaScript - The BSON JavaScript value.scope - The scope for the JavaScriptpublic void accept(Visitor visitor)
Visitor.visitJavaScript(String,String,Document) method.accept in interface Elementaccept in class JavaScriptElementvisitor - The visitor for the element.Element.accept(Visitor)public boolean equals(Object object)
equals in class JavaScriptElementobject - The object to compare to.Object.equals(java.lang.Object)public Document getScope()
public ElementType getType()
getType in interface ElementgetType in class JavaScriptElementpublic int hashCode()
hashCode in class JavaScriptElementpublic String toString()
toString in class JavaScriptElementObject.toString()public JavaScriptWithScopeElement withName(String name)
Returns a new JavaScriptElement.
Returns a new JavaScriptElement.
withName in interface ElementwithName in class JavaScriptElementname - The new name for the element.Copyright © 2011-2012 Allanbank Consulting, Inc.. All Rights Reserved.