edu.stanford.nlp.ling.tokensregex.types
Interface Expression

All Known Subinterfaces:
AssignableExpression, Value<T>
All Known Implementing Classes:
Expressions.AndExpression, Expressions.AssignableFunctionCallExpression, Expressions.CaseExpression, Expressions.CompositeValue, Expressions.ConditionalExpression, Expressions.FieldExpression, Expressions.FunctionCallExpression, Expressions.IfExpression, Expressions.IndexedExpression, Expressions.ListExpression, Expressions.MethodCallExpression, Expressions.NotExpression, Expressions.OrExpression, Expressions.PrimitiveValue, Expressions.RegexMatchResultVarExpression, Expressions.RegexMatchVarExpression, Expressions.RegexValue, Expressions.SimpleCachedExpression, Expressions.SimpleExpression, Expressions.SimpleValue, Expressions.TypedExpression, Expressions.VarAssignmentExpression, Expressions.VarExpression, Expressions.WrappedExpression

public interface Expression

This interfaces represents an expression that can be evaluated to obtain a value

Author:
Angel Chang

Method Summary
 Value evaluate(Env env, java.lang.Object... args)
          Evaluates the expression using the specified environment and arguments.
 Tags getTags()
          Returns tags associated with this expression
 java.lang.String getType()
          Returns a string indicating the type of this expression
 boolean hasValue()
          Returns whether the expression has already been evaluated to a Value
 void setTags(Tags tags)
          Set the tags associated with this expression
 Expression simplify(Env env)
          Simplifies the expression using the specified environment
 

Method Detail

getTags

Tags getTags()
Returns tags associated with this expression

Returns:
Tags associated with this expression

setTags

void setTags(Tags tags)
Set the tags associated with this expression

Parameters:
tags - Tags to associate with this expression

getType

java.lang.String getType()
Returns a string indicating the type of this expression

Returns:
type of this expressions

simplify

Expression simplify(Env env)
Simplifies the expression using the specified environment

Parameters:
env - Environment to simply with respect to
Returns:
Simplified expressions

evaluate

Value evaluate(Env env,
               java.lang.Object... args)
Evaluates the expression using the specified environment and arguments. Arguments are additional context not provided by the environment.

Parameters:
env -
args -
Returns:
Evaluated value

hasValue

boolean hasValue()
Returns whether the expression has already been evaluated to a Value

Returns:
True if the expression is already evaluated


Stanford NLP Group