com.zfabrik.util.expression
Class X.Var

java.lang.Object
  extended by com.zfabrik.util.expression.X
      extended by com.zfabrik.util.expression.X.Var
Enclosing class:
X

public static class X.Var
extends X

Variable of field value operator. The value of the X.Var operator is to denote a variable or field name. During evaluation this name should be resolved to a value.

In the default map context evaluation, the map value for the variable name is returned as evaluation result

Author:
hb

Nested Class Summary
 
Nested classes/interfaces inherited from class com.zfabrik.util.expression.X
X.And, X.BinaryOp, X.Eq, X.Ge, X.Gt, X.In, X.Le, X.Lt, X.Neq, X.Not, X.Or, X.UnaryOp, X.Val, X.Var, X.Xor
 
Constructor Summary
X.Var(java.lang.String name)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.Object eval(java.util.Map<java.lang.String,java.lang.Object> context)
          Evaluation of the expression over a map style context that defines variable values.
 java.lang.String get()
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class com.zfabrik.util.expression.X
and, and, eq, eq, eval, eval, ge, gt, in, le, lt, neq, neq, not, not, or, or, val, var, xor, xor
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

X.Var

public X.Var(java.lang.String name)
Method Detail

get

public java.lang.String get()

eval

public java.lang.Object eval(java.util.Map<java.lang.String,java.lang.Object> context)
Description copied from class: X
Evaluation of the expression over a map style context that defines variable values.

Specified by:
eval in class X

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object