org.araneaframework.backend.list.memorybased.compexpr
Class LazyComparatorExpression

java.lang.Object
  extended byorg.araneaframework.backend.list.memorybased.compexpr.LazyComparatorExpression
All Implemented Interfaces:
ComparatorExpression, Serializable

public class LazyComparatorExpression
extends Object
implements ComparatorExpression

ComparatorExpression that is initialized lazily.

Since:
1.1
Author:
Rein Raudjärv
See Also:
Serialized Form

Constructor Summary
LazyComparatorExpression(ComparatorExpressionFactory factory)
           
 
Method Summary
 int compare(VariableResolver resolver1, VariableResolver resolver2)
          Returns a negative integer, zero, or a positive integer as the first Variable is less than, equal to, or greater than the second.
 ComparatorExpression getComparatorExpression()
           
 ComparatorExpressionFactory getFactory()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LazyComparatorExpression

public LazyComparatorExpression(ComparatorExpressionFactory factory)
Method Detail

getFactory

public ComparatorExpressionFactory getFactory()

getComparatorExpression

public ComparatorExpression getComparatorExpression()

compare

public int compare(VariableResolver resolver1,
                   VariableResolver resolver2)
            throws ExpressionEvaluationException
Description copied from interface: ComparatorExpression
Returns a negative integer, zero, or a positive integer as the first Variable is less than, equal to, or greater than the second.

Specified by:
compare in interface ComparatorExpression
Parameters:
resolver1 - Resolver that is used to evalute the first Variable.
resolver2 - Resolver that is used to evalute the second Variable.
Returns:
a negative integer, zero, or a positive integer as the first Variable is less than, equal to, or greater than the second.
Throws:
ExpressionEvaluationException - when the comparation fails.