A - the argument type.T - the returned value type.public final class RightBoundFunction<A,T> extends Object implements UnaryFunction<A,T>, Serializable
BinaryFunction
to the
UnaryFunction interface
using a constant right-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 |
|---|
RightBoundFunction(BinaryFunction<? super A,? super R,? extends T> function,
R arg) |
| Modifier and Type | Method and Description |
|---|---|
static <L,R,T> RightBoundFunction<L,T> |
bind(BinaryFunction<? super L,? super R,? extends T> function,
R arg)
Adapt a BinaryFunction to the UnaryFunction interface.
|
boolean |
equals(Object that) |
boolean |
equals(RightBoundFunction<?,?> that)
Learn whether another RightBoundFunction is equal to this.
|
T |
evaluate(A obj)
Evaluate this function.
|
int |
hashCode() |
String |
toString() |
public RightBoundFunction(BinaryFunction<? super A,? super R,? extends T> function, R arg)
R - 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(RightBoundFunction<?,?> that)
that - RightBoundFunction to testpublic static <L,R,T> RightBoundFunction<L,T> bind(BinaryFunction<? super L,? super R,? extends T> function, R arg)
L - the left argument type.R - the right argument type.T - the returned value type.function - BinaryFunction to adaptarg - Object that will always be used for the right side of the BinaryFunction delegate.Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.