Package one.microstream.collections
Class AbstractSimpleArrayCollection<E>
java.lang.Object
one.microstream.collections.AbstractExtendedCollection<E>
one.microstream.collections.AbstractArrayCollection<E>
one.microstream.collections.AbstractSectionedArrayCollection<E>
one.microstream.collections.AbstractSimpleArrayCollection<E>
- Type Parameters:
E
- type of contained elements
- All Implemented Interfaces:
ExtendedCollection<E>
,Sized
- Direct Known Subclasses:
ArrayAccessor
,ArrayCollector
,ArrayView
,BulkList
,ConstLinearEnum
,ConstList
,EqBulkList
,EqConstList
,FixedList
,LimitList
public abstract class AbstractSimpleArrayCollection<E> extends AbstractSectionedArrayCollection<E>
-
Nested Class Summary
Nested classes/interfaces inherited from interface one.microstream.collections.interfaces.ExtendedCollection
ExtendedCollection.Creator<E,C extends ExtendedCollection<E>>
-
Constructor Summary
Constructors Constructor Description AbstractSimpleArrayCollection()
-
Method Summary
Modifier and Type Method Description protected abstract E[]
internalGetStorageArray()
This is an internal shortcut method to provide fast access to the various array-backed list implementations' storage arrays.
The purpose of this method is to allow access to the array only for read-only procedures, never for modifying accesses.protected static <E> E[]
internalGetStorageArray(AbstractSimpleArrayCollection<?> subject)
Workaround method to handle the generics warning at a central place instead of maintaining them at hundreds of code locations.protected abstract int
internalSize()
Methods inherited from class one.microstream.collections.AbstractSectionedArrayCollection
internalGetSectionIndices
Methods inherited from class one.microstream.collections.AbstractArrayCollection
marker, newArray, newArray, pow2BoundMaxed
Methods inherited from class one.microstream.collections.AbstractExtendedCollection
ensureFreeArrayCapacity, internalCountingAddAll, internalCountingAddAll, internalCountingAddAll, internalCountingPutAll, internalCountingPutAll, internalCountingPutAll, validateIndex
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface one.microstream.collections.interfaces.ExtendedCollection
hasVolatileElements, nullAllowed
-
Constructor Details
-
AbstractSimpleArrayCollection
public AbstractSimpleArrayCollection()
-
-
Method Details
-
internalGetStorageArray
This is an internal shortcut method to provide fast access to the various array-backed list implementations' storage arrays.
The purpose of this method is to allow access to the array only for read-only procedures, never for modifying accesses.The returned array is expected to contain the elements of the list in simple order from index 0 on to index (size - 1), so for example an array-backed ring list (queue) can NOT (reasonably) extend this class.
- Specified by:
internalGetStorageArray
in classAbstractSectionedArrayCollection<E>
- Returns:
- the storage array used by the list, containing all elements in straight order.
-
internalSize
protected abstract int internalSize() -
internalGetStorageArray
Workaround method to handle the generics warning at a central place instead of maintaining them at hundreds of code locations. Note that the calling logic must guarantee the type safety (see calls of this method for examples)- Parameters:
subject
-
-