org.xshare.base.predicate
Interface BinaryPredicate

All Known Implementing Classes:
BinaryAndPredicate, BinaryNandPredicate, BinaryNorPredicate, BinaryOrPredicate, BinaryXorPredicate

public interface BinaryPredicate

A binary predicate represents a arbitrary operation on two objects and returns as result of this operation a boolean value.

The implementing classes have to ensure two things:

Since:
0.20
Version:
$Revision: 1.3 $
Author:
Oliver Fischer
See Also:
BinaryFunction

Field Summary
static BinaryPredicate ALWAYS_FALSE
          Instance of a BinaryPredicate which is always returns false.
static BinaryPredicate ALWAYS_TRUE
          Instance of a BinaryPredicate which is always returns true.
 
Method Summary
 boolean exec(java.lang.Object pFirst, java.lang.Object pSecond)
          Executes the implemented operation on both given objects and returns a boolean value as the result of the operation.
 

Field Detail

ALWAYS_FALSE

public static final BinaryPredicate ALWAYS_FALSE
Instance of a BinaryPredicate which is always returns false.


ALWAYS_TRUE

public static final BinaryPredicate ALWAYS_TRUE
Instance of a BinaryPredicate which is always returns true.

Method Detail

exec

public boolean exec(java.lang.Object pFirst,
                    java.lang.Object pSecond)
Executes the implemented operation on both given objects and returns a boolean value as the result of the operation.

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]