Payload - The payload type.public final class PairIterable<Payload> extends Object implements ProtectedIterable<Payload>
PairIterable is a ProtectedIterable that iterates over a given
Pair, where both components have a common super type.
Calling iterator() creates an instance of
PairIterator.
| Constructor and Description |
|---|
PairIterable(Pair<? extends Payload,? extends Payload> pair)
Creates a new
PairIterable for the given Pair. |
public PairIterable(Pair<? extends Payload,? extends Payload> pair) throws IllegalArgumentException
PairIterable for the given Pair.pair - The Pair to iterate over.IllegalArgumentException - If the given Pair is null.public PairIterator<Payload> iterator()