A - the argument type.T - the returned value type.public final class LeftBoundFunction<A,T> extends Object implements UnaryFunction<A,T>, Serializable
BinaryFunction
to the
UnaryFunction interface
using a constant left-side argument.
Note that although this class implements
Serializable, a given instance will
only be truly Serializable if the
underlying objects are. Attempts to serialize
an instance whose delegates are not
Serializable will result in an exception.| Constructor and Description |
|---|
LeftBoundFunction(BinaryFunction<? super L,? super A,? extends T> function,
L arg)
Create a new LeftBoundFunction instance.
|
| Modifier and Type | Method and Description |
|---|---|
static <L,R,T> LeftBoundFunction<R,T> |
bind(BinaryFunction<? super L,? super R,? extends T> function,
L arg)
Adapt a BinaryFunction as a UnaryFunction.
|
boolean |
equals(LeftBoundFunction<?,?> that)
Learn whether another LeftBoundFunction is equal to this.
|
boolean |
equals(Object that) |
T |
evaluate(A obj)
Evaluate this function.
|
int |
hashCode() |
String |
toString() |
public LeftBoundFunction(BinaryFunction<? super L,? super A,? extends T> function, L arg)
L - bound arg typefunction - the function to adaptarg - the constant argument to usepublic T evaluate(A obj)
evaluate in interface UnaryFunction<A,T>obj - the A object to evaluatepublic boolean equals(LeftBoundFunction<?,?> that)
that - LeftBoundFunction to testpublic static <L,R,T> LeftBoundFunction<R,T> bind(BinaryFunction<? super L,? super R,? extends T> function, L arg)
L - left typeR - right typeT - result typefunction - to adaptarg - left side argumentCopyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.