net.sf.jga.fn.comparison

Class Greater<T>

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