Payload - The payload type.public final class PrefixedIterable<Payload> extends Object implements Iterable<Payload>
PrefixedIterable is an Iterable that can be wrapped around
a given Iterable and generates Iterators that yield
some given prefix values before every object yielded by an Iterator
that is generated by the given Iterable.
Calling iterator() creates an instance of
PrefixedIterator.
| Constructor and Description |
|---|
PrefixedIterable(Iterable<? extends Payload> iterable,
Payload... prefixes)
Creates a new
PrefixedIterable from the given Iterable. |
| Modifier and Type | Method and Description |
|---|---|
PrefixedIterator<Payload> |
iterator() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic PrefixedIterable(Iterable<? extends Payload> iterable, Payload... prefixes) throws IllegalArgumentException
PrefixedIterable from the given Iterable.iterable - The Iterable, around which the new
PrefixedIterable will be wrapped.prefixes - The prefixes to be yielded.IllegalArgumentException - If the given Iterable is null.public PrefixedIterator<Payload> iterator()
Copyright © 2015–2016 Markenwerk – Gesellschaft für markenbildende Maßnahmen mbH. All rights reserved.