L - the left argument type.R - the right argument type.public class TransposedProcedure<L,R> extends Object implements BinaryProcedure<L,R>, Serializable
procedure.
For example, given a procedure p
and the ordered pair of arguments a,
b.
runs
p.run(b,a).
Note that although this class implements
Serializable, a given instance will
only be truly Serializable if the
underlying functor is. Attempts to serialize
an instance whose delegate is not
Serializable will result in an exception.
| Constructor and Description |
|---|
TransposedProcedure(BinaryProcedure<? super R,? super L> procedure)
Create a new TransposedProcedure.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object that) |
boolean |
equals(TransposedProcedure<?,?> that)
Learn whether another TransposedProcedure is equal to this.
|
int |
hashCode() |
void |
run(L left,
R right)
Execute this procedure.
|
String |
toString() |
static <L,R> TransposedProcedure<R,L> |
transpose(BinaryProcedure<? super L,? super R> p)
Transpose a BinaryProcedure.
|
public TransposedProcedure(BinaryProcedure<? super R,? super L> procedure)
procedure - BinaryProcedure to transposepublic void run(L left, R right)
run in interface BinaryProcedure<L,R>left - the L element of the ordered pair of argumentsright - the R element of the ordered pair of argumentspublic boolean equals(TransposedProcedure<?,?> that)
that - TransposedPredicate to testpublic static <L,R> TransposedProcedure<R,L> transpose(BinaryProcedure<? super L,? super R> p)
L - the left argument type.R - the right argument type.p - to transposeCopyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.