|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.jga.fn.Functor<R>
net.sf.jga.fn.BinaryFunctor<T,T,java.lang.Boolean>
net.sf.jga.fn.comparison.NotEqualTo<T>
public class NotEqualTo<T>
Binary Predicate that returns TRUE for object arguments x and y when x != y using the built-in equals() method or an optional Comparator given at construction. By default, this object will not throw NullPointerException: it will return true if either runtime arguments is null but false if both are null. If an optional comparator is used, then its implementation will determine if a NullPointerException is thrown when passed a null argument.
To serialize an NotEqual functor, the comparator passed at construction(if any) must be Serializable.
Copyright © 2002-2005 David A. Hall
| Nested Class Summary | |
|---|---|
static interface |
NotEqualTo.Visitor
Interface for classes that may interpret a NotEqualTo predicate. |
| Constructor Summary | |
|---|---|
NotEqualTo()
Builds an EqualTo that uses the built-in equals method. |
|
NotEqualTo(java.util.Comparator<? super T> comp)
Builds an EqualTo that uses the given comparator. |
|
| Method Summary | |
|---|---|
void |
accept(Visitor v)
Calls the Visitor's visit(NotEqualTo) method, if it
implements the nested Visitor interface. |
java.lang.Boolean |
fn(T x,
T y)
Given arguments x and y, returns !(x.equals(y)). |
java.util.Comparator<? super T> |
getComparator()
Returns the comparator in use by this functor, if any. |
java.lang.String |
toString()
|
| Methods inherited from class net.sf.jga.fn.BinaryFunctor |
|---|
bind, bind0th, bind1st, bind2nd, bindNth, compose, compose, composeNth, distribute, eval, generate, generate1st, generate2nd, generateNth |
| Methods inherited from class net.sf.jga.fn.Functor |
|---|
composeNth |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public NotEqualTo()
public NotEqualTo(java.util.Comparator<? super T> comp)
| Method Detail |
|---|
public java.util.Comparator<? super T> getComparator()
public java.lang.Boolean fn(T x,
T y)
fn in class BinaryFunctor<T,T,java.lang.Boolean>public void accept(Visitor v)
visit(NotEqualTo) method, if it
implements the nested Visitor interface.
accept in interface Visitableaccept in class Functor<java.lang.Boolean>public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||