net.sf.jga.fn.comparison
public class Between<T extends Comparable> extends AbstractUnaryPredicate<T> implements Serializable
Copyright © 2003 David A. Hall
Nested Class Summary | |
---|---|
interface | Between.Visitor
Interface for classes that may interpret an Between predicate. |
Constructor Summary | |
---|---|
Between(T lo, T hi)
Builds a Between predicate that returns TRUE when its argument is between
its two arguments (inclusive). | |
Between(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(Between) 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(Between)
method, if it
implements the nested Visitor interface.Returns: lo < x < hi