public class ConstantExpression extends Object implements Expression
ConstantExpression represents a constant expression.
In other words, evaluate(org.apache.commons.betwixt.expression.Context) returns a value independent of the context.
| Constructor and Description |
|---|
ConstantExpression()
Base constructor
|
ConstantExpression(Object value)
Convenience constructor sets
value property. |
| Modifier and Type | Method and Description |
|---|---|
Object |
evaluate(Context context)
Evaluate expression against given context.
|
Object |
getValue()
Gets the constant value of this expression
|
void |
setValue(Object value)
Sets the constant value of this expression
|
String |
toString()
Returns something useful for logging
|
void |
update(Context context,
String newValue)
Do nothing
|
public ConstantExpression()
public ConstantExpression(Object value)
value property.value - the Object which is the constant value for this expressionpublic Object evaluate(Context context)
evaluate in interface Expressioncontext - evaluate expression against this contextvalue propertypublic void update(Context context, String newValue)
update in interface Expressioncontext - update this ContextnewValue - the new value for this expressionExpressionpublic Object getValue()
public void setValue(Object value)
value - the constant value for this expressionCopyright © 2002-2013 Apache Software Foundation. All Rights Reserved.