org.springmodules.validation.valang.predicates
Class AbstractPropertyPredicate

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

public abstract class AbstractPropertyPredicate
extends Object
implements org.apache.commons.collections.Predicate

AbstractPropertyPredicate deals with extracting values from properties and as such is a utilty base class.

Since:
23-04-2005
Author:
Steven Devijver

Constructor Summary
AbstractPropertyPredicate(Function leftFunction, Operator operator, Function rightFunction, int line, int column)
          Constructor
 
Method Summary
abstract  boolean evaluate(Object target)
          Evaluate expression.
protected  Object[] getArray(Object literal)
          Gets array.
 int getColumn()
          Sets line.
protected  Iterator getIterator(Object literal)
          Gets Iterator.
 Function getLeftFunction()
          Gets left function.
 int getLine()
          Gets line.
 Operator getOperator()
          Gets operator.
 Function getRightFunction()
          Gets right function.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractPropertyPredicate

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

Method Detail

getLeftFunction

public final Function getLeftFunction()
Gets left function.


getOperator

public final Operator getOperator()
Gets operator.


getRightFunction

public final Function getRightFunction()
Gets right function.


getLine

public int getLine()
Gets line.


getColumn

public int getColumn()
Sets line.


getIterator

protected final Iterator getIterator(Object literal)
Gets Iterator.


getArray

protected final Object[] getArray(Object literal)
Gets array.


evaluate

public abstract boolean evaluate(Object target)
Evaluate expression.

Specified by:
evaluate in interface org.apache.commons.collections.Predicate


Copyright © 2009. All Rights Reserved.