Interface XProcessingCollection<E>
- All Superinterfaces:
CapacityCarrying
,Clearable
,ConsolidatableCollection
,Copyable
,ExtendedCollection<E>
,Iterable<E>
,OptimizableCollection
,Processable<E>
,ReleasingCollection<E>
,Sized
,Truncateable
,XGettingCollection<E>
,XIterable<E>
,XJoinable<E>
,XRemovingCollection<E>
- All Known Subinterfaces:
XBag<E>
,XBasicEnum<E>
,XBasicList<E>
,XBasicSequence<E>
,XBasicTable<K,V>
,XBasicTable.Keys<K,V>
,XBasicTable.Values<K,V>
,XChart<K,V>
,XChart.Keys<K,V>
,XChart.Values<K,V>
,XCollection<E>
,XDecreasingEnum<E>
,XDecreasingList<E>
,XDecreasingSequence<E>
,XEnum<E>
,XLadder<E>
,XList<E>
,XMap<K,V>
,XMap.Keys<K,V>
,XMap.Values<K,V>
,XProcessingBag<E>
,XProcessingEnum<E>
,XProcessingList<E>
,XProcessingMap.Keys<K,V>
,XProcessingMap.Values<K,V>
,XProcessingSequence<E>
,XProcessingSet<E>
,XProcessingSortation<E>
,XRank<E>
,XSequence<E>
,XSet<E>
,XSortation<E>
,XTable<K,V>
,XTable.Keys<K,V>
,XTable.Values<K,V>
- All Known Implementing Classes:
ArrayCollector
,BulkList
,EnumProcessor
,EqBulkList
,EqHashEnum
,EqHashTable
,EqHashTable.Keys
,EqHashTable.Values
,HashEnum
,HashTable
,HashTable.Keys
,HashTable.Values
,LimitList
,ListProcessor
,LockedCollection
,LockedList
,LockedMap
,MutexSet
,OpenAdressingMiniSet
,Single
,SubList
,SubListProcessor
,SubProcessor
,SynchCollection
,SynchList
,SynchSet
public interface XProcessingCollection<E> extends Processable<E>, XRemovingCollection<E>, XGettingCollection<E>
A removing collection has to be a getting collection as well, because some removal procedures
could be abused to read the contained elements (e.g.
retrieveBy(Predicate)
).
Splitting it up into a (pure) RemovingCollection and a RemGetCollection would cause
more structural clutter than it's worth.-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
XProcessingCollection.Factory<E>
Nested classes/interfaces inherited from interface one.microstream.collections.interfaces.ExtendedCollection
ExtendedCollection.Creator<E,C extends ExtendedCollection<E>>
Nested classes/interfaces inherited from interface one.microstream.collections.types.XGettingCollection
XGettingCollection.Creator<E>
Nested classes/interfaces inherited from interface one.microstream.collections.types.XIterable
XIterable.Executor<E>
-
Method Summary
Modifier and Type Method Description E
fetch()
Remove and retrieve first or throw IndexOutOfBoundsException if empty (fetch ~= first).<P extends Consumer<? super E>>
Piterate(P procedure)
Executes the given procedure for each element of theXIterable
until all elements have been processed or the action throws an exception.<C extends Consumer<? super E>>
CmoveTo(C target, Predicate<? super E> predicate)
E
pinch()
Remove and retrieve first or null if empty (like forceful extraction from collection's base)long
removeBy(Predicate<? super E> predicate)
long
removeDuplicates(Equalator<? super E> equalator)
E
retrieve(E element)
Remove and retrieve first occurrence.E
retrieveBy(Predicate<? super E> predicate)
Remove and retrieve first item that match the predicate.Methods inherited from interface one.microstream.collections.interfaces.CapacityCarrying
isFull, maximumCapacity, remainingCapacity
Methods inherited from interface one.microstream.collections.interfaces.ExtendedCollection
nullAllowed
Methods inherited from interface one.microstream.collections.types.XGettingCollection
applies, contains, containsAll, containsId, containsSearched, copy, copyTo, count, countBy, distinct, distinct, equality, equals, equals, equalsContent, except, filterTo, get, hashCode, hasVolatileElements, immure, intersect, intSize, iterator, join, max, min, nullContained, old, search, seek, size, toArray, toArray, union, view
Methods inherited from interface one.microstream.collections.types.XRemovingCollection
clear, consolidate, nullRemove, optimize, remove, removeAll, removeDuplicates, removeOne, retainAll, truncate
-
Method Details
-
fetch
E fetch()Remove and retrieve first or throw IndexOutOfBoundsException if empty (fetch ~= first).- Returns:
- First item
-
pinch
E pinch()Remove and retrieve first or null if empty (like forceful extraction from collection's base)- Returns:
- First item or null when empty
-
retrieve
Remove and retrieve first occurrence.- Parameters:
element
- The element to retrieve- Returns:
- The item.
-
retrieveBy
Remove and retrieve first item that match the predicate.- Parameters:
predicate
- The Predicate for the search.- Returns:
- The item matched (and is also removed)
-
removeDuplicates
-
removeBy
-
moveTo
-
iterate
Description copied from interface:XIterable
Executes the given procedure for each element of theXIterable
until all elements have been processed or the action throws an exception. Unless otherwise specified by the implementing class, procedures are performed in the order of iteration (if an iteration order is specified). Exceptions thrown by the procedure are relayed to the caller.
Should be identical toIterable.forEach(Consumer)
.
-