net.sf.jga.fn.comparison

Class LessEqual<T>

public class LessEqual<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
interfaceLessEqual.Visitor
Interface for classes that may interpret a LessEqual predicate.
Method Summary
voidaccept(Visitor v)
Calls the Visitor's visit(LessEqual) 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(LessEqual) 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()