Interface BinaryPredicate<T>
-
- Type Parameters:
T
- the type of the operands
- All Superinterfaces:
BinaryFunction<T,java.lang.Boolean>
- All Known Implementing Classes:
AbstractQuantityStatisticPredicate
,IsEqualTo
,IsNotEqualTo
,QuantityGreaterPredicate
,QuantityLessPredicate
public interface BinaryPredicate<T> extends BinaryFunction<T,java.lang.Boolean>
Represents a predicate (boolean-valued function) of two arguments of the same type. This is a functional interface whose functional method istest(Object, Object)
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.lang.Boolean
perform(T left, T right)
Has to be implemented to perform the actual operation.boolean
test(T left, T right)
Evaluates the predicate (condition) on the given arguments.
-
-
-
Method Detail
-
test
boolean test(T left, T right)
Evaluates the predicate (condition) on the given arguments.- Parameters:
left
- the left operator of the conditionright
- the right operator of the condition- Returns:
true
if the predicate is fulfilled,false
otherwise.
-
perform
default java.lang.Boolean perform(T left, T right)
Description copied from interface:BinaryFunction
Has to be implemented to perform the actual operation. The order of operands might be important or not, depending, if the operation is commutative or not.- Specified by:
perform
in interfaceBinaryFunction<T,java.lang.Boolean>
- Parameters:
left
- the left operand to be used in the operationright
- the right operand to be used in the operation- Returns:
- the result of the operation
-
-