org.apache.commons.functor.core
Class LeftIdentity

java.lang.Object
  extended by org.apache.commons.functor.core.LeftIdentity

public final class LeftIdentity
extends Object

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: 1160411 $ $Date: 2011-08-22 22:09:01 +0200 (Mon, 22 Aug 2011) $
Author:
Rodney Waldhoff, Matt Benson

Field Summary
static BinaryFunction<Object,Object,Object> FUNCTION
          Left-identity function.
static BinaryPredicate<Boolean,Object> PREDICATE
          Left-identity predicate.
 
Constructor Summary
LeftIdentity()
          Create a new LeftIdentity (for clients that require an object).
 
Method Summary
static
<L,R> BinaryFunction<L,R,L>
function()
          Get a Left-identity BinaryFunction.
static
<R> BinaryPredicate<Boolean,R>
predicate()
          Get a left-identity BinaryPredicate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FUNCTION

public static final BinaryFunction<Object,Object,Object> FUNCTION
Left-identity function.


PREDICATE

public static final BinaryPredicate<Boolean,Object> PREDICATE
Left-identity predicate.

Constructor Detail

LeftIdentity

public LeftIdentity()
Create a new LeftIdentity (for clients that require an object).

Method Detail

function

public static <L,R> BinaryFunction<L,R,L> function()
Get a Left-identity BinaryFunction.

Type Parameters:
L - the left argument type.
R - the right argument type.
Returns:
BinaryFunction

predicate

public static <R> BinaryPredicate<Boolean,R> predicate()
Get a left-identity BinaryPredicate.

Type Parameters:
R - the right argument type.
Returns:
BinaryPredicate


Copyright © 2003-2011 The Apache Software Foundation. All Rights Reserved.