L - the left argument type.R - the right argument type.T - the returned value type.public final class BinaryProcedureBinaryFunction<L,R,T> extends Object implements BinaryFunction<L,R,T>, Serializable
BinaryProcedure
to the
BinaryFunction interface
by always returning null.
Note that although this class implements
Serializable, a given instance will
only be truly Serializable if the
underlying procedure is. Attempts to serialize
an instance whose delegate is not
Serializable will result in an exception.| Constructor and Description |
|---|
BinaryProcedureBinaryFunction(BinaryProcedure<? super L,? super R> procedure)
Create a new BinaryProcedureBinaryFunction.
|
| Modifier and Type | Method and Description |
|---|---|
static <L,R,T> BinaryProcedureBinaryFunction<L,R,T> |
adapt(BinaryProcedure<? super L,? super R> procedure)
|
boolean |
equals(BinaryProcedureBinaryFunction<?,?,?> that)
Learn whether another BinaryProcedureBinaryFunction is equal to this.
|
boolean |
equals(Object that) |
T |
evaluate(L left,
R right)
Evaluate this function.
|
int |
hashCode() |
String |
toString() |
public BinaryProcedureBinaryFunction(BinaryProcedure<? super L,? super R> procedure)
procedure - to adapt as a BinaryFunctionpublic T evaluate(L left, R right)
evaluate in interface BinaryFunction<L,R,T>left - the L element of the ordered pair of argumentsright - the R element of the ordered pair of argumentspublic boolean equals(BinaryProcedureBinaryFunction<?,?,?> that)
that - the BinaryProcedureBinaryFunction to testpublic static <L,R,T> BinaryProcedureBinaryFunction<L,R,T> adapt(BinaryProcedure<? super L,? super R> procedure)
null,
BinaryProcedure to the
BinaryFunction interface.
When the given BinaryProcedure is null,
returns null.L - the left argument type.R - the right argument type.T - the returned value type.procedure - the possibly-null
BinaryFunction to adaptBinaryProcedureBinaryFunction wrapping the given
BinaryFunction, or null
if the given BinaryFunction is nullCopyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.