Class LeftIdentity
java.lang.Object
org.apache.commons.functor.core.LeftIdentity
Holder class for a left-identity
BinaryFunction (evaluates to the left argument) and a left-identity
BinaryPredicate (tests whether left Boolean argument equals Boolean.TRUE).- Version:
- $Revision$ $Date$
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BinaryFunction<Object, Object, Object> Left-identity function.static final BinaryPredicate<Boolean, Object> Left-identity predicate. -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new LeftIdentity (for clients that require an object). -
Method Summary
Modifier and TypeMethodDescriptionstatic <L,R> BinaryFunction <L, R, L> function()Get a Left-identity BinaryFunction.static <R> BinaryPredicate<Boolean, R> Get a left-identity BinaryPredicate.
-
Field Details
-
FUNCTION
Left-identity function. -
PREDICATE
Left-identity predicate.
-
-
Constructor Details
-
LeftIdentity
public LeftIdentity()Create a new LeftIdentity (for clients that require an object).
-
-
Method Details
-
function
Get a Left-identity BinaryFunction.- Type Parameters:
L- the left argument type.R- the right argument type.- Returns:
- BinaryFunctioninvalid input: '<'L, R, L>
-
predicate
Get a left-identity BinaryPredicate.- Type Parameters:
R- the right argument type.- Returns:
- BinaryPredicateinvalid input: '<'Boolean, R>
-