Does nobody monitor the functor project?
-----Original Message-----
From: James Carman [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 18, 2004 9:18 AM
To: [EMAIL PROTECTED]
Subject: [FUNCTOR] Does functor have a class for this?
I want to turn a BinaryPredicate into a Predicate by using Functions for the
left/right operands to the BinaryPredicate.
public class BinaryPredicateToPredicate implements Predicate
{
private final Function leftFunction;
private final Function rightFunction;
private final BinaryPredicate binaryPredicate;
public BinaryPredicateToPredicate( BinaryPredicate binaryPredicate,
Function leftFunction, Function rightPredicate )
{
this.leftFunction = leftFunction;
this.rightFunction = rightFunction;
this.binaryPredicate = binaryPredicate;
}
public boolean test()
{
binaryPredicate.test( leftFunction.evaluate(), rightFunction.evaluate()
);
}
}
Does the functor library already have something for this?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]