public class UnaryExpression extends Expression
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
operator
The operator.
|
static java.lang.String |
OPERATOR_BNOT
The bitwise not operator "~".
|
static java.lang.String |
OPERATOR_MINUS
The (unary) minus operator "-".
|
static java.lang.String |
OPERATOR_NOT
The not operator "!".
|
protected Expression |
value
The value expression.
|
Constructor and Description |
---|
UnaryExpression(Expression value,
java.lang.String operator)
Create a new unary operation.
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsVariable(Variable var)
Test if a variable is contained in the expression.
|
boolean |
equals(java.lang.Object o)
Test if this expression is equal to some object.
|
java.lang.Object |
getOperator()
Get the operator.
|
Expression |
getValue()
Get the value.
|
int |
hashCode()
Get the hash code of this expression.
|
java.lang.String |
toString()
Get a string representation of this expression.
|
public static final java.lang.String OPERATOR_NOT
public static final java.lang.String OPERATOR_MINUS
public static final java.lang.String OPERATOR_BNOT
protected Expression value
protected java.lang.String operator
public UnaryExpression(Expression value, java.lang.String operator)
public boolean containsVariable(Variable var)
containsVariable
in class Expression
var
- The variable.public Expression getValue()
public java.lang.Object getOperator()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object