org.xshare.base.predicate
Class BinaryNorPredicate

java.lang.Object
  |
  +--org.xshare.base.predicate.BinaryNorPredicate
All Implemented Interfaces:
BinaryPredicate

public final class BinaryNorPredicate
extends java.lang.Object
implements BinaryPredicate

A binary predicate represents a 'nor' like conjunction of two BinaryPredicates.

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

Field Summary
 
Fields inherited from interface org.xshare.base.predicate.BinaryPredicate
ALWAYS_FALSE, ALWAYS_TRUE
 
Constructor Summary
BinaryNorPredicate(BinaryPredicate pFirstPredicate, BinaryPredicate pSecondPredicate)
          Constructs a 'nor' predicate for two BinaryPredicates.
 
Method Summary
 boolean exec(java.lang.Object pFirst, java.lang.Object pSecond)
          Passes the two argument objects two both predicates and returns true if both predicates are not satisfied by both argument.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BinaryNorPredicate

public BinaryNorPredicate(BinaryPredicate pFirstPredicate,
                          BinaryPredicate pSecondPredicate)
Constructs a 'nor' predicate for two BinaryPredicates.

Parameters:
pFirstPredicate - a BinaryPredicate object representing the first predicate connected with this instance.
pSecondPredicate - a BinaryPredicate 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 pFirst,
                    java.lang.Object pSecond)
Passes the two argument objects two both predicates and returns true if both predicates are not satisfied by both argument.

Specified by:
exec in interface BinaryPredicate
Parameters:
pFirst - an Object object representing the first argument passed to both predicates.
pSecond - an Object object representing the second argument passed to both predicates.
Returns:
a boolean value which is true both predicates are not satisfied by both arguments. 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]