cdqa.function
Class BinaryPredicate

java.lang.Object
  extended by cdqa.function.Function
      extended by cdqa.function.BinaryFunction
          extended by cdqa.function.BinaryPredicate
Direct Known Subclasses:
BinaryPredicateOr

public abstract class BinaryPredicate
extends BinaryFunction

class BinaryPredicate extends BinaryFunction

Author:
simonkm

Field Summary
(package private) static BinaryPredicate FALSE
           
(package private) static BinaryPredicate RIGHTTRUE
           
(package private) static BinaryPredicate TRUE
           
 
Fields inherited from class cdqa.function.BinaryFunction
FIRSTARG, SECONDARG
 
Fields inherited from class cdqa.function.Function
NULL, repository
 
Constructor Summary
BinaryPredicate()
           
 
Method Summary
 boolean apply(XObject o1, XObject o2)
          invokes onApply(o1,o2)
 Iterator createIteratorInstance(Iterator i1, Iterator i2)
          creates join iterator
abstract  boolean onApply(XObject o1, XObject o2)
           
 XObject onExecute(XObject o1, XObject o2)
           
static BinaryPredicateOr or(BinaryPredicate p1, BinaryPredicate p2)
           
static BinaryPredicate rightIsTrue()
           
static BinaryPredicate theFalsePredicate()
           
static BinaryPredicate theTruePredicate()
           
 
Methods inherited from class cdqa.function.BinaryFunction
createIteratorInstance, execute, firstArg, secondArg
 
Methods inherited from class cdqa.function.Function
createIteratorInstance, forName, getRepository
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRUE

static BinaryPredicate TRUE

FALSE

static BinaryPredicate FALSE

RIGHTTRUE

static BinaryPredicate RIGHTTRUE
Constructor Detail

BinaryPredicate

public BinaryPredicate()
Method Detail

onApply

public abstract boolean onApply(XObject o1,
                                XObject o2)

onExecute

public final XObject onExecute(XObject o1,
                               XObject o2)
Specified by:
onExecute in class BinaryFunction

createIteratorInstance

public Iterator createIteratorInstance(Iterator i1,
                                       Iterator i2)
creates join iterator

Overrides:
createIteratorInstance in class BinaryFunction
Returns:

apply

public final boolean apply(XObject o1,
                           XObject o2)
invokes onApply(o1,o2)

Parameters:
o1 -
o2 -
Returns:

theTruePredicate

public static BinaryPredicate theTruePredicate()

theFalsePredicate

public static BinaryPredicate theFalsePredicate()

rightIsTrue

public static BinaryPredicate rightIsTrue()

or

public static BinaryPredicateOr or(BinaryPredicate p1,
                                   BinaryPredicate p2)