public class UnaryExpression extends Object implements Expression, ElementAssignable
Expression with 1
 operand.| Modifier and Type | Field and Description | 
|---|---|
protected Expression | 
myExpression
The sub expression. 
 | 
protected String | 
myOperator
The operator. 
 | 
| Constructor and Description | 
|---|
UnaryExpression(String operator,
               Expression expression)
Creates a new NaryExpression. 
 | 
protected final Expression myExpression
protected final String myOperator
public UnaryExpression(String operator, Expression expression)
operator - The operator this object represents.expression - The sub expression.public Element asElement()
Element.
 Overridden to return the sub expressions as an element:
{ "$op" : ??? }
asElement in interface ElementAssignableElement.public DocumentElement toElement(String name)
Overridden to return the sub expressions as a document with a nested array element:
{ <name> : { "$op" : ??? } }
toElement in interface Expressionname - The name for the expression's element.Copyright © 2011-2013 Allanbank Consulting, Inc.. All Rights Reserved.