de.unkrig.commons.text.expression
Class AbstractExpression

java.lang.Object
  extended by de.unkrig.commons.text.expression.AbstractExpression
All Implemented Interfaces:
Expression

public abstract class AbstractExpression
extends java.lang.Object
implements Expression

An implementation of Expression which implements the "evaluateTo*()" convenience methods.


Field Summary
 
Fields inherited from interface de.unkrig.commons.text.expression.Expression
FALSE, NULL, TRUE
 
Constructor Summary
AbstractExpression()
           
 
Method Summary
 java.lang.Object evaluateTo(Mapping<java.lang.String,?> variables, java.lang.Class<?> targetType)
           
 boolean evaluateToBoolean(Mapping<java.lang.String,?> variables)
           
 java.lang.Object evaluateToPrimitive(Mapping<java.lang.String,?> variables, java.lang.Class<?> targetType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.unkrig.commons.text.expression.Expression
evaluate
 

Constructor Detail

AbstractExpression

public AbstractExpression()
Method Detail

evaluateTo

@Nullable
public final java.lang.Object evaluateTo(Mapping<java.lang.String,?> variables,
                                                  java.lang.Class<?> targetType)
                                  throws EvaluationException
Specified by:
evaluateTo in interface Expression
Throws:
EvaluationException
See Also:
ExpressionEvaluator.to(Object, Class)

evaluateToPrimitive

public final java.lang.Object evaluateToPrimitive(Mapping<java.lang.String,?> variables,
                                                  java.lang.Class<?> targetType)
                                           throws EvaluationException
Specified by:
evaluateToPrimitive in interface Expression
Throws:
EvaluationException
See Also:
ExpressionEvaluator.toPrimitive(Object, Class)

evaluateToBoolean

public final boolean evaluateToBoolean(Mapping<java.lang.String,?> variables)
                                throws EvaluationException
Specified by:
evaluateToBoolean in interface Expression
Throws:
EvaluationException
See Also:
ExpressionEvaluator.toBoolean(Object)