Payload - The payload type.public final class ListSource<Payload> extends AbstractIndexedSource<Payload>
| Constructor and Description |
|---|
ListSource(List<Payload> list)
Creates a new
CodeSource. |
| Modifier and Type | Method and Description |
|---|---|
protected Payload |
doGet(int index)
Returns a payload value at the given index.
|
protected ProtectedBidirectionalIterator<Payload> |
doIterator(boolean reverse)
Returns a
ProtectedBidirectionalIterator. |
List<Payload> |
getList()
Returns the
List of payload values this ListSource has
been created with. |
int |
size()
Returns the number of payload values of this
Source. |
doGetFirst, firstIndexOf, firstIndexOfMatch, get, getLast, getLast, getLastMatch, isFirst, isLast, iterator, iterator, lastIndexOf, lastIndexOfMatchcontains, containsAll, containsAll, containsMatch, createPredicate, firstIndexOf, getAll, getAllMatches, getFirst, getFirst, getFirstMatch, isEmpty, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetFirst, getFirst, getFirstMatchcontains, containsAll, containsAll, containsMatch, getAll, getAllMatches, isEmptyforEach, spliteratorpublic ListSource(List<Payload> list) throws IllegalArgumentException
CodeSource.list - The List of payload values to be used.IllegalArgumentException - If the given List of payload values is
null.public final List<Payload> getList()
List of payload values this ListSource has
been created with.List of payload values.public int size()
SourceSource.Source.protected Payload doGet(int index)
AbstractIndexedSourcedoGet in class AbstractIndexedSource<Payload>index - The index to be used, which is guaranteed to be not negative
and not larger then or equal to the
size of this
AbstractIndexedSource.protected ProtectedBidirectionalIterator<Payload> doIterator(boolean reverse)
AbstractIndexedSourceProtectedBidirectionalIterator.doIterator in class AbstractIndexedSource<Payload>reverse - The initial index to be used. Whether to return a
ProtectedBidirectionalIterator that iterates this
indexed source in reverse.ProtectedBidirectionalIterator.Copyright © 2016–2017 Markenwerk – Gesellschaft für markenbildende Maßnahmen mbH. All rights reserved.