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

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

public class VariableComparatorExpression
extends Object
implements ComparatorExpression, Variable

See Also:
Serialized Form

Field Summary
protected  Comparator comparator
           
protected  String name
           
 
Constructor Summary
VariableComparatorExpression(String name, Comparator comparator)
           
 
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.
 Comparator getComparator()
           
 String getName()
          Returns the name of this Variable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected String name

comparator

protected Comparator comparator
Constructor Detail

VariableComparatorExpression

public VariableComparatorExpression(String name,
                                    Comparator comparator)
Method Detail

getName

public String getName()
Description copied from interface: Variable
Returns the name of this Variable.

Specified by:
getName in interface Variable
Returns:
the name of this Variable.

getComparator

public Comparator getComparator()

compare

public int compare(VariableResolver resolver1,
                   VariableResolver resolver2)
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.