org.springmodules.validation.valang.predicates
Class BetweenTestPredicate

java.lang.Object
  extended by org.springmodules.validation.valang.predicates.AbstractPropertyPredicate
      extended by org.springmodules.validation.valang.predicates.BetweenTestPredicate
All Implemented Interfaces:
org.apache.commons.collections.Predicate
Direct Known Subclasses:
NotBetweenTestPredicate

public class BetweenTestPredicate
extends AbstractPropertyPredicate

Tests if a value is between two others.

Author:
David Winterfeldt

Constructor Summary
BetweenTestPredicate(Function leftFunction, Operator operator, Function rightFunction, int line, int column)
          Constructor taking two functions and an operator.
 
Method Summary
 boolean evaluate(Object target)
          The evaluate method takes the result of both functions and tests with the operator.
 
Methods inherited from class org.springmodules.validation.valang.predicates.AbstractPropertyPredicate
getArray, getColumn, getIterator, getLeftFunction, getLine, getOperator, getRightFunction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BetweenTestPredicate

public BetweenTestPredicate(Function leftFunction,
                            Operator operator,
                            Function rightFunction,
                            int line,
                            int column)

Constructor taking two functions and an operator.

Parameters:
leftFunction - the left function
operator - the operator.
Method Detail

evaluate

public boolean evaluate(Object target)

The evaluate method takes the result of both functions and tests with the operator.

Specified by:
evaluate in interface org.apache.commons.collections.Predicate
Specified by:
evaluate in class AbstractPropertyPredicate
Parameters:
target - The target bean.
Returns:
boolean Whether or not the test passed.


Copyright © 2009. All Rights Reserved.