org.apache.commons.functor.core
Class RightIdentity

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

public final class RightIdentity
extends Object

Holder class for a right-identity BinaryFunction (evaluates to the right argument) and a right-identity BinaryPredicate (tests whether right Boolean argument equals Boolean.TRUE).

Version:
$Revision: 1160415 $ $Date: 2011-08-22 22:14:38 +0200 (Mon, 22 Aug 2011) $
Author:
Rodney Waldhoff, Matt Benson

Field Summary
static BinaryFunction<Object,Object,Object> FUNCTION
          Right-identity function.
static BinaryPredicate<Object,Boolean> PREDICATE
          Right-identity predicate.
 
Constructor Summary
RightIdentity()
          Create a new RightIdentity.
 
Method Summary
static
<L,R> BinaryFunction<L,R,R>
function()
          Get a typed right-identity BinaryFunction.
static
<L> BinaryPredicate<L,Boolean>
predicate()
          Get a typed right-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
Right-identity function.


PREDICATE

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

Constructor Detail

RightIdentity

public RightIdentity()
Create a new RightIdentity.

Method Detail

function

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

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

predicate

public static <L> BinaryPredicate<L,Boolean> predicate()
Get a typed right-identity BinaryPredicate.

Type Parameters:
L - the left argument type.
Returns:
BinaryPredicate


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