L - the procedure left argument type.R - the procedure right argument type.public class BinarySequence<L,R> extends Object implements BinaryProcedure<L,R>, Serializable
BinaryProcedure
that runs an ordered
sequence of BinaryProcedures.
When the sequence is empty, this procedure is does
nothing.
Note that although this class implements
Serializable, a given instance will
only be truly Serializable if all the
underlying functors are. Attempts to serialize
an instance whose delegates are not all
Serializable will result in an exception.
| Constructor and Description |
|---|
BinarySequence()
Create a new BinarySequence.
|
BinarySequence(BinaryProcedure<? super L,? super R>... procedures)
Create a new BinarySequence instance.
|
BinarySequence(Iterable<BinaryProcedure<? super L,? super R>> procedures)
Create a new BinarySequence instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(BinarySequence<?,?> that)
Learn whether another BinarySequence is equal to this.
|
boolean |
equals(Object that) |
int |
hashCode() |
void |
run(L left,
R right)
Execute this procedure.
|
BinarySequence<L,R> |
then(BinaryProcedure<? super L,? super R> p)
Fluently add a BinaryProcedure.
|
String |
toString() |
public BinarySequence()
public BinarySequence(BinaryProcedure<? super L,? super R>... procedures)
procedures - to run sequentiallypublic BinarySequence(Iterable<BinaryProcedure<? super L,? super R>> procedures)
procedures - to run sequentiallypublic final BinarySequence<L,R> then(BinaryProcedure<? super L,? super R> p)
p - BinaryProcedure to addpublic final 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 final boolean equals(BinarySequence<?,?> that)
that - BinarySequence to testCopyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.