edu.stanford.nlp.ling.tokensregex.types
Class Expressions.VarExpression

java.lang.Object
  extended by edu.stanford.nlp.ling.tokensregex.types.Expressions.TypedExpression
      extended by edu.stanford.nlp.ling.tokensregex.types.Expressions.SimpleExpression<java.lang.String>
          extended by edu.stanford.nlp.ling.tokensregex.types.Expressions.VarExpression
All Implemented Interfaces:
AssignableExpression, Expression, java.io.Serializable
Enclosing class:
Expressions

public static class Expressions.VarExpression
extends Expressions.SimpleExpression<java.lang.String>
implements AssignableExpression

A variable, which can be assigned any expression. When evaluated, the value of the variable is retrieved from the environment, evaluated, and returned.

See Also:
Serialized Form

Constructor Summary
Expressions.VarExpression(java.lang.String varname, java.lang.String... tags)
           
 
Method Summary
 Expression assign(Expression expr)
           
 Value evaluate(Env env, java.lang.Object... args)
          Evaluates the expression using the specified environment and arguments.
 
Methods inherited from class edu.stanford.nlp.ling.tokensregex.types.Expressions.SimpleExpression
get, toString
 
Methods inherited from class edu.stanford.nlp.ling.tokensregex.types.Expressions.TypedExpression
getTags, getType, hasValue, setTags, simplify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.stanford.nlp.ling.tokensregex.types.Expression
getTags, getType, hasValue, setTags, simplify
 

Constructor Detail

Expressions.VarExpression

public Expressions.VarExpression(java.lang.String varname,
                                 java.lang.String... tags)
Method Detail

evaluate

public Value evaluate(Env env,
                      java.lang.Object... args)
Description copied from interface: Expression
Evaluates the expression using the specified environment and arguments. Arguments are additional context not provided by the environment.

Specified by:
evaluate in interface Expression
Returns:
Evaluated value

assign

public Expression assign(Expression expr)
Specified by:
assign in interface AssignableExpression


Stanford NLP Group