net.sf.jga.fn.logical
public class UnaryNegate<T> extends AbstractUnaryPredicate<T> implements Serializable
Copyright © 2002 David A. Hall
Nested Class Summary | |
---|---|
interface | UnaryNegate.Visitor
Interface for classes that may interpret a UnaryNegate
predicate. |
Constructor Summary | |
---|---|
UnaryNegate(UnaryFunctor<T,Boolean> p)
Builds a UnaryNegate predicate wrapping the given Unary Predicate. |
Method Summary | |
---|---|
void | accept(Visitor v)
Calls the Visitor's visit(UnaryNegate) method, if it
implements the nested Visitor interface. |
UnaryFunctor<T,Boolean> | getPredicate()
Returns the child predicate. |
boolean | p(T x)
Given argument x, returns true when child
predicate p returns false for x, otherwise returns true.
|
String | toString() |
Throws: IllegalArgumentException when no child predicate is given
visit(UnaryNegate)
method, if it
implements the nested Visitor interface.Returns: the child predicate.
Returns: !(p.p(x))