edu.stanford.nlp.ling.tokensregex.types
Class Expressions.SimpleCachedExpression<T>
java.lang.Object
edu.stanford.nlp.ling.tokensregex.types.Expressions.TypedExpression
edu.stanford.nlp.ling.tokensregex.types.Expressions.SimpleExpression<T>
edu.stanford.nlp.ling.tokensregex.types.Expressions.SimpleCachedExpression<T>
- Type Parameters:
T - type of the expression object
- All Implemented Interfaces:
- Expression, java.io.Serializable
- Direct Known Subclasses:
- Expressions.CompositeValue
- Enclosing class:
- Expressions
public static class Expressions.SimpleCachedExpression<T>
- extends Expressions.SimpleExpression<T>
A simple implementation of an expression that is represented by a java object of type T
and which also has a cached Value stored with it
- See Also:
- Serialized Form
|
Method Summary |
protected Value |
doEvaluation(Env env,
java.lang.Object... args)
|
Value |
evaluate(Env env,
java.lang.Object... args)
Evaluates the expression using the specified environment and
arguments. |
boolean |
hasValue()
Returns whether the expression has already been evaluated to
a Value |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Expressions.SimpleCachedExpression
protected Expressions.SimpleCachedExpression(java.lang.String typename,
T value,
java.lang.String... tags)
doEvaluation
protected Value doEvaluation(Env env,
java.lang.Object... args)
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.
- Returns:
- Evaluated value
hasValue
public boolean hasValue()
- Description copied from interface:
Expression
- Returns whether the expression has already been evaluated to
a Value
- Specified by:
hasValue in interface Expression- Overrides:
hasValue in class Expressions.TypedExpression
- Returns:
- True if the expression is already evaluated
Stanford NLP Group