public class SubProcessor<E> extends SubView<E> implements XProcessingSequence<E>
XProcessingSequence.Factory<E>XGettingCollection.Creator<E>XIterable.Executor<E>Copyable.Static| Constructor and Description |
|---|
SubProcessor() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears all elements from the collection while leaving the capacity as it is.
|
long |
consolidate()
Consolidates the internal storage of this collection by discarding all elements of the internal storage that
have become obsolete or otherwise unneeded anymore.
|
SubProcessor<E> |
copy()
Creates a true copy of this list which references the same elements in the same order as this list does
at the time the method is called.
|
E |
fetch() |
<C extends Consumer<? super E>> |
moveSelection(C target,
long... indices) |
<C extends Consumer<? super E>> |
moveTo(C target,
Predicate<? super E> predicate) |
long |
nullRemove() |
OldCollection<E> |
old() |
long |
optimize()
Optimizes internal memory usage by rebuilding the storage to only occupy as much memory as needed to store
the currently contained elements in terms of the collection's current memory usage configuration
(e.g.
|
E |
pick() |
E |
pinch() |
E |
pop() |
<P extends Consumer<? super E>> |
process(P procedure) |
long |
remove(E element) |
long |
removeAll(XGettingCollection<? extends E> elements) |
E |
removeAt(long index) |
long |
removeBy(Predicate<? super E> predicate) |
long |
removeDuplicates() |
long |
removeDuplicates(Equalator<? super E> equalator) |
boolean |
removeOne(E element) |
XProcessingSequence<E> |
removeRange(long offset,
long length) |
long |
removeSelection(long[] indices) |
long |
retainAll(XGettingCollection<? extends E> elements)
Removing all elements except the ones contained in the given elements-collection.
|
XProcessingSequence<E> |
retainRange(long offset,
long length)
Removing all elements but the ones from the offset (basically start index)
to the offset+length (end index).
|
E |
retrieve(E element) |
E |
retrieveBy(Predicate<? super E> predicate) |
SubProcessor<E> |
toReversed()
Creates a new
XGettingSequence with the reversed order of elements. |
void |
truncate()
Clears (and reinitializes if needed) this collection in the fastest possible way, i.e.
|
SubProcessor<E> |
view()
Creates a view of this collection and returns it.
|
applies, at, contains, containsAll, containsId, containsSearched, copySelection, copyTo, count, countBy, distinct, distinct, equality, equals, equalsContent, except, filterTo, first, get, hasVolatileElements, immure, indexBy, indexOf, intersect, isEmpty, isFull, isSorted, iterate, iterateIndexed, iterator, join, last, lastIndexBy, lastIndexOf, max, maximumCapacity, maxIndex, min, minIndex, nullAllowed, nullContained, peek, poll, range, remainingCapacity, scan, search, seek, size, toArray, toArray, union, viewclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitviewat, copySelection, first, get, hasIndex, immure, indexBy, indexOf, isSorted, last, lastIndexBy, lastIndexOf, maxIndex, minIndex, peek, poll, range, scaniterateIndexediterateapplies, contains, containsAll, containsId, containsSearched, copyTo, count, countBy, distinct, distinct, equality, equals, equals, equalsContent, except, filterTo, hashCode, hasVolatileElements, intersect, intSize, iterator, join, max, min, nullContained, search, seek, size, toArray, toArray, unionnullAllowedforEach, spliteratorisFull, maximumCapacity, remainingCapacitypublic E fetch()
fetch in interface XProcessingCollection<E>public <C extends Consumer<? super E>> C moveSelection(C target, long... indices)
moveSelection in interface XProcessingSequence<E>public E pick()
pick in interface XProcessingSequence<E>public E pinch()
pinch in interface XProcessingCollection<E>public E pop()
pop in interface XProcessingSequence<E>public E removeAt(long index)
removeAt in interface XProcessingSequence<E>public XProcessingSequence<E> removeRange(long offset, long length)
removeRange in interface XRemovingSequence<E>public XProcessingSequence<E> retainRange(long offset, long length)
XRemovingSequenceretainRange in interface XRemovingSequence<E>offset - is the index of the first element to retainlength - is the amount of elements to retainpublic long removeSelection(long[] indices)
removeSelection in interface XRemovingSequence<E>public E retrieve(E element)
retrieve in interface XProcessingCollection<E>public E retrieveBy(Predicate<? super E> predicate)
retrieveBy in interface XProcessingCollection<E>public boolean removeOne(E element)
removeOne in interface XRemovingCollection<E>public <C extends Consumer<? super E>> C moveTo(C target, Predicate<? super E> predicate)
moveTo in interface XProcessingCollection<E>public final <P extends Consumer<? super E>> P process(P procedure)
process in interface Processable<E>public long removeBy(Predicate<? super E> predicate)
removeBy in interface XProcessingCollection<E>public long removeDuplicates(Equalator<? super E> equalator)
removeDuplicates in interface XProcessingCollection<E>public void clear()
XRemovingCollectionclear in interface XRemovingCollection<E>clear in interface Clearablepublic long consolidate()
ConsolidatableCollectionWeakReference entries whose reference has
been cleared).consolidate in interface ConsolidatableCollectionconsolidate in interface XRemovingCollection<E>public long nullRemove()
nullRemove in interface XRemovingCollection<E>public long optimize()
XRemovingCollectionIf this is not possible or not needed in the concreate implementation, this method does nothing.
Note that this method can consume a considerable amount of time depending on the implementation and should only be called intentionally and accurately when reducing occupied memory is needed.
optimize in interface OptimizableCollectionoptimize in interface XRemovingCollection<E>public long remove(E element)
remove in interface XRemovingCollection<E>public long removeAll(XGettingCollection<? extends E> elements)
removeAll in interface XRemovingCollection<E>public long removeDuplicates()
removeDuplicates in interface XRemovingCollection<E>public long retainAll(XGettingCollection<? extends E> elements)
XRemovingCollectionBasically intersect this collection with the given collection and only keeping the resulting elements.
retainAll in interface XRemovingCollection<E>elements - to retainpublic void truncate()
XRemovingCollectiontruncate in interface Truncateabletruncate in interface XRemovingCollection<E>public SubProcessor<E> copy()
XGettingSequencepublic SubProcessor<E> view()
XGettingCollection
A view is different from immutable collection (XGettingCollection.immure())
in the way, that changes in this collection are still affecting the view.
The immutable collection on the other hand has no reference to this collection
and changes therefore do not affect the immutable collection.
view in interface XGettingCollection<E>view in interface XGettingSequence<E>view in class SubView<E>public OldCollection<E> old()
public SubProcessor<E> toReversed()
XGettingSequenceXGettingSequence with the reversed order of elements.
This method creates a new collection and does not change the existing collection.
toReversed in interface XGettingSequence<E>toReversed in interface XProcessingSequence<E>toReversed in class SubView<E>Copyright © 2022 MicroStream Software. All rights reserved.