org.xshare.base.predicate
Class UnaryNandPredicate

java.lang.Object
  |
  +--org.xshare.base.predicate.UnaryNandPredicate
All Implemented Interfaces:
UnaryPredicate

public final class UnaryNandPredicate
extends java.lang.Object
implements UnaryPredicate

A binary predicate represents a 'nand' like conjunction of two UnaryPredicates.

Since:
0.20
Version:
$Revision: 1.1 $
Author:
Oliver Fischer
See Also:
UnaryPredicate

Field Summary
 
Fields inherited from interface org.xshare.base.predicate.UnaryPredicate
ALWAYS_FALSE, ALWAYS_TRUE
 
Constructor Summary
UnaryNandPredicate(UnaryPredicate pFirstPredicate, UnaryPredicate pSecondPredicate)
          Constructs a 'nand' predicate for two UnaryPredicate.
 
Method Summary
 boolean exec(java.lang.Object pVictim)
          Passes the argument object two both predicates and returns true if at least one predicate is not satisfied by the argument.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnaryNandPredicate

public UnaryNandPredicate(UnaryPredicate pFirstPredicate,
                          UnaryPredicate pSecondPredicate)
Constructs a 'nand' predicate for two UnaryPredicate.

Parameters:
pFirstPredicate - a UnaryPredicate object representing the first predicate connected with this instance.
pSecondPredicate - a UnaryPredicate object representing the second predicate connected with this instance.
Throws:
java.lang.NullPointerException - if one of both predicates is null.
Method Detail

exec

public boolean exec(java.lang.Object pVictim)
Passes the argument object two both predicates and returns true if at least one predicate is not satisfied by the argument.

Specified by:
exec in interface UnaryPredicate
Parameters:
pVictim - an Object object representing the argument passed to both predicates.
Returns:
a boolean value which is true at least on predicate is not satisfied by the argument object. Otherwise false is expected as return value.
Throws:
java.lang.ClassCastException - if the implementing class can not operate on the given object.


jKiska Base 0.2.1 Release Esche [http://jkiska.sourceforge.net]