Payload - The payload type.public abstract class AbstractListSequence<Payload> extends AbstractSequence<Payload>
| Constructor and Description |
|---|
AbstractListSequence(Nullity nullity,
List<Payload> list)
Creates a new
CodeSource. |
| Modifier and Type | Method and Description |
|---|---|
protected Source<Payload> |
doClear()
Removes all payload values.
|
protected Payload |
doGet(int index)
Returns a payload value at the given index.
|
protected void |
doInsert(int index,
Payload payload)
Inserts the given payload value as the new first value.
|
protected ProtectedBidirectionalIterator<Payload> |
doIterator(boolean reverse)
Returns a
ProtectedBidirectionalIterator. |
protected Payload |
doRemove(int index)
Removes the payload value at the given index.
|
protected Source<Payload> |
doRemoveAll(Predicate<? super Payload> predicate,
boolean satisfying)
Removes the payload values that satisfy the given
Predicate. |
protected Payload |
doReplace(int index,
Payload payload)
Replaces the payload value at the given index with the given replacement
payload value.
|
List<Payload> |
getList()
Returns the
List of payload values this
AbstractListSequence has been created with. |
int |
size()
Returns the number of payload values of this
Source. |
append, appendAll, appendAll, clear, equals, getNullity, hashCode, insert, insertAll, insertAll, onInserted, onRemoved, onRemoved, prepend, prependAll, prependAll, remove, removeAll, removeAllMatches, removeFirst, removeFirst, removeFirstMatch, removeLast, removeLast, removeLastMatch, replace, replaceAll, replaceAllMatches, replaceFirst, replaceFirst, replaceFirstMatch, replaceLast, replaceLast, replaceLastMatch, retainAll, retainAllMatchesdoGetFirst, firstIndexOf, firstIndexOfMatch, get, getLast, getLast, getLastMatch, isFirst, isLast, iterator, iterator, lastIndexOf, lastIndexOfMatchcontains, containsAll, containsAll, containsMatch, createPredicate, firstIndexOf, getAll, getAllMatches, getFirst, getFirst, getFirstMatch, isEmpty, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitfirstIndexOf, firstIndexOfMatch, get, getFirst, getFirst, getFirstMatch, getLast, getLast, getLastMatch, isFirst, isLast, iterator, lastIndexOf, lastIndexOfMatchcontains, containsAll, containsAll, containsMatch, getAll, getAllMatches, isEmptyiteratoriteratorforEach, spliteratorpublic AbstractListSequence(Nullity nullity, List<Payload> list)
CodeSource.nullity - The Nullity to be used.list - The List to be used.IllegalArgumentException - If the given Nullity is null of if the
given List is null.public final List<Payload> getList()
List of payload values this
AbstractListSequence has been created with.List of payload values.public final int size()
SourceSource.Source.protected final void doInsert(int index,
Payload payload)
AbstractSequencedoInsert in class AbstractSequence<Payload>index - The index to be used.payload - The payload value to be inserted, which is guaranteed to be
not null, unless the Nullity of this
Sequence is Nullity.ALLOW.protected final 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 final Payload doRemove(int index)
AbstractSequencedoRemove in class AbstractSequence<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
AbstractSequence.protected final Source<Payload> doRemoveAll(Predicate<? super Payload> predicate, boolean satisfying)
AbstractSequencePredicate.doRemoveAll in class AbstractSequence<Payload>predicate - The Predicate to be used, which is guaranteed to be
not null.satisfying - Whether the Predicate must be satisfied or not.Source yielding the removed payload values.}.protected final Source<Payload> doClear()
AbstractSequencedoClear in class AbstractSequence<Payload>Source yielding the removed payload values.protected final Payload doReplace(int index, Payload payload)
AbstractSequencedoReplace in class AbstractSequence<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
AbstractSequence.payload - The replacement payload value to be used.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.