org.apache.commons.betwixt.expression
Class EmptyExpression

java.lang.Object
  extended by org.apache.commons.betwixt.expression.EmptyExpression
All Implemented Interfaces:
Expression

public class EmptyExpression
extends java.lang.Object
implements Expression

EmptyExpression returns the same value as is passed in.

See evaluate(org.apache.commons.betwixt.expression.Context).

Version:
$Revision: 438373 $
Author:
James Strachan

Constructor Summary
EmptyExpression()
          Should this be private?
 
Method Summary
 java.lang.Object evaluate(Context context)
          Return the bean we're evaluating.
static EmptyExpression getInstance()
          Gets the singleton instance.
 java.lang.String toString()
          Return something useful for logging.
 void update(Context context, java.lang.String newValue)
          Do nothing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EmptyExpression

public EmptyExpression()
Should this be private?

Method Detail

getInstance

public static EmptyExpression getInstance()
Gets the singleton instance.

Returns:
the EmptyExpression singleton.

evaluate

public java.lang.Object evaluate(Context context)
Return the bean we're evaluating.

Specified by:
evaluate in interface Expression
Parameters:
context - evaluate against this Context
Returns:
the value of the expression
See Also:
Expression

update

public void update(Context context,
                   java.lang.String newValue)
Do nothing

Specified by:
update in interface Expression
Parameters:
context - update this Context
newValue - the new value for this expression
See Also:
Expression

toString

public java.lang.String toString()
Return something useful for logging.

Overrides:
toString in class java.lang.Object
Returns:
short name for this class


Copyright © 2002-2008 The Apache Software Foundation. All Rights Reserved.