net.sf.jga.fn.comparison

Class Less<T>

public class Less<T extends Comparable> extends AbstractBinaryPredicate<T,T> implements Serializable

Binary Predicate that returns TRUE for Comparable arguments x and y when x < y using the compareTo() method. Null values are not considered comparable, and a NullPointerException will be thrown if either argument is null.

Copyright © 2002 David A. Hall

Author: David A. Hall

Nested Class Summary
interfaceLess.Visitor
Interface for classes that may interpret a Less predicate.
Method Summary
voidaccept(Visitor v)
Calls the Visitor's visit(Less) method, if it implements the nested Visitor interface.
booleanp(T x, T y)
Given Comparable arguments x and y, returns x < y.
StringtoString()

Method Detail

accept

public void accept(Visitor v)
Calls the Visitor's visit(Less) method, if it implements the nested Visitor interface.

p

public boolean p(T x, T y)
Given Comparable arguments x and y, returns x < y.

Returns: x < y

Throws: NullPointerException if either argument is null

toString

public String toString()