net.sf.molae.pipe.binop
Class BinaryFunctions

java.lang.Object
  extended by net.sf.molae.pipe.binop.BinaryFunctions

public final class BinaryFunctions
extends Object

Contains useful implementations of the BinaryFunction interface.


Field Summary
static BinaryFunction FIRST_OPERAND
          A binary function that returns the first operand.
 
Constructor Summary
BinaryFunctions()
           
 
Method Summary
static
<S1,S2> BinaryFunction<S1,S2,S1>
firstOperand()
          Returns a binary function that always returns the first operand.
static
<S1,S2> BinaryFunction<S1,S2,S2>
secondOperand()
          Returns a binary function that always returns the second operand.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FIRST_OPERAND

public static final BinaryFunction FIRST_OPERAND
A binary function that returns the first operand.

See Also:
firstOperand()
Constructor Detail

BinaryFunctions

public BinaryFunctions()
Method Detail

firstOperand

public static final <S1,S2> BinaryFunction<S1,S2,S1> firstOperand()
Returns a binary function that always returns the first operand.


secondOperand

public static final <S1,S2> BinaryFunction<S1,S2,S2> secondOperand()
Returns a binary function that always returns the second operand.