Package one.microstream.collections
Class SubCollector<E>
java.lang.Object
one.microstream.collections.SubView<E>
one.microstream.collections.SubCollector<E>
- All Implemented Interfaces:
Iterable<E>,Consumer<E>,CapacityCarrying,CapacityExtendable,ExtendedCollection<E>,ExtendedSequence<E>,OptimizableCollection,Sized,XAddingCollection<E>,XAddingSequence<E>,XGettingCollection<E>,XGettingSequence<E>,XIndexIterable<E>,XIterable<E>,XJoinable<E>,XPuttingCollection<E>,XPuttingSequence<E>,Copyable
public class SubCollector<E> extends SubView<E> implements XPuttingSequence<E>
-
Nested Class Summary
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.XGettingSequence
XGettingSequence.Factory<E>Nested classes/interfaces inherited from interface one.microstream.collections.types.XIterable
XIterable.Executor<E>Nested classes/interfaces inherited from interface one.microstream.collections.types.XPuttingSequence
XPuttingSequence.Creator<E> -
Constructor Summary
Constructors Constructor Description SubCollector() -
Method Summary
Modifier and Type Method Description voidaccept(E element)booleanadd(E element)SubCollector<E>addAll(E... elements)SubCollector<E>addAll(E[] elements, int srcStartIndex, int srcLength)SubCollector<E>addAll(XGettingCollection<? extends E> elements)longcurrentCapacity()Returns the current amount of elements this instance can hold before a storage rebuild becomes necessary.SubCollector<E>ensureCapacity(long minimalCapacity)SubCollector<E>ensureFreeCapacity(long minimalFreeCapacity)Ensures that the next minimalFreeCapacity elements can be actually added in a fast way, meaning for example no internal storage rebuild will be necessary.booleannullAdd()booleannullPut()longoptimize()Optimizes the internal storage of this collection and returns the storage size of the collection after the process is complete.booleanput(E element)SubCollector<E>putAll(E... elements)SubCollector<E>putAll(E[] elements, int srcStartIndex, int srcLength)SubCollector<E>putAll(XGettingCollection<? extends E> elements)Methods inherited from class one.microstream.collections.SubView
applies, at, contains, containsAll, containsId, containsSearched, copy, 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, old, peek, poll, range, remainingCapacity, scan, search, seek, size, toArray, toArray, toReversed, union, view, viewMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface one.microstream.collections.interfaces.CapacityCarrying
isFull, maximumCapacity, remainingCapacityMethods inherited from interface one.microstream.collections.interfaces.CapacityExtendable
currentFreeCapacityMethods inherited from interface one.microstream.collections.interfaces.ExtendedCollection
nullAllowedMethods inherited from interface one.microstream.collections.types.XGettingCollection
equals, hashCode, intSize
-
Constructor Details
-
SubCollector
public SubCollector()
-
-
Method Details
-
putAll
- Specified by:
putAllin interfaceXPuttingCollection<E>- Specified by:
putAllin interfaceXPuttingSequence<E>
-
putAll
- Specified by:
putAllin interfaceXPuttingCollection<E>- Specified by:
putAllin interfaceXPuttingSequence<E>
-
putAll
- Specified by:
putAllin interfaceXPuttingCollection<E>- Specified by:
putAllin interfaceXPuttingSequence<E>
-
nullPut
public final boolean nullPut()- Specified by:
nullPutin interfaceXPuttingCollection<E>
-
put
- Specified by:
putin interfaceXPuttingCollection<E>
-
add
- Specified by:
addin interfaceXAddingCollection<E>
-
addAll
- Specified by:
addAllin interfaceXAddingCollection<E>- Specified by:
addAllin interfaceXAddingSequence<E>
-
addAll
- Specified by:
addAllin interfaceXAddingCollection<E>- Specified by:
addAllin interfaceXAddingSequence<E>
-
addAll
- Specified by:
addAllin interfaceXAddingCollection<E>- Specified by:
addAllin interfaceXAddingSequence<E>
-
accept
-
nullAdd
public final boolean nullAdd()- Specified by:
nullAddin interfaceXAddingCollection<E>
-
currentCapacity
public final long currentCapacity()Description copied from interface:CapacityExtendableReturns the current amount of elements this instance can hold before a storage rebuild becomes necessary.For carrier implementations that don't have a concept of storage rebuilding (like linked list for example) this method returns the same value as
CapacityCarrying.maximumCapacity().- Specified by:
currentCapacityin interfaceCapacityExtendable- Returns:
- the current capacity of this instance before a rebuild is required.
-
ensureCapacity
- Specified by:
ensureCapacityin interfaceCapacityExtendable
-
ensureFreeCapacity
Description copied from interface:CapacityExtendableEnsures that the next minimalFreeCapacity elements can be actually added in a fast way, meaning for example no internal storage rebuild will be necessary.- Specified by:
ensureFreeCapacityin interfaceCapacityExtendable
-
optimize
public final long optimize()Description copied from interface:OptimizableCollectionOptimizes the internal storage of this collection and returns the storage size of the collection after the process is complete.- Specified by:
optimizein interfaceOptimizableCollection- Returns:
- the storage size of the collection after the optimzation.
-