net.sf.jga.fn.comparison
public class BetweenComp<T> extends AbstractUnaryPredicate<T> implements Serializable
Copyright © 2003 David A. Hall
Nested Class Summary | |
---|---|
interface | BetweenComp.Visitor
Interface for classes that may interpret an BetweenComp predicate. |
Constructor Summary | |
---|---|
BetweenComp(T lo, T hi, Comparator<T> comp)
Builds a BetweenComp predicate that returns TRUE when its argument is
between its two arguments (inclusive). | |
BetweenComp(UnaryFunctor<T,Boolean> lo, UnaryFunctor<T,Boolean> hi)
Builds a Between predicate that returns TRUE when both of the given
predicates return TRUE for the same argument. |
Method Summary | |
---|---|
void | accept(Visitor v)
Calls the Visitor's visit(BetweenComp) method, if it
implements the nested Visitor interface. |
boolean | p(T x)
Given argument x, returns TRUE if x is between lo and hi.
|
String | toString() |
Throws: IllegalArgumentException when either argument is null or when lo > hi
visit(BetweenComp)
method, if it
implements the nested Visitor interface.Returns: lo < x < hi