net.sf.jga.fn.comparison

Class NotEqualTo<T>

public class NotEqualTo<T> extends AbstractBinaryPredicate<T,T> implements Serializable

Binary Predicate that returns TRUE for object arguments x and y when x != y using the built-in equals() method. This object will not throw NullPointerException: it will return true if either runtime arguments is null but false if both are null.

Copyright © 2002 David A. Hall

Author: David A. Hall

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

Method Detail

accept

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

p

public boolean p(T x, T y)
Given arguments x and y, returns !(x.equals(y)). Will not throw NullPointerException if either x or y are null: will return true if either x or y (but not both) are null, will return false if both x and y are null.

Returns: !(x.equals(y))

toString

public String toString()