E - type of contained elementspublic abstract class AbstractSectionedArrayCollection<E> extends AbstractArrayCollection<E>
ExtendedCollection.Creator<E,C extends ExtendedCollection<E>>| Constructor and Description |
|---|
AbstractSectionedArrayCollection() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract int[] |
internalGetSectionIndices()
Defines the array sections in which the collection's elements are organized by one or more pairs of
indices in the order corresponding to the collection's logical order of its contained elements.
|
protected abstract E[] |
internalGetStorageArray()
This is an internal shortcut method to provide fast access to the various array-backed collection
implementations' storage arrays.
The purpose of this method is to allow access to the array only for read-only procedures, never for modifying accesses. |
marker, newArray, newArray, pow2BoundMaxedensureFreeArrayCapacity, internalCountingAddAll, internalCountingAddAll, internalCountingAddAll, internalCountingPutAll, internalCountingPutAll, internalCountingPutAll, validateIndexclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithasVolatileElements, nullAllowedprotected abstract E[] internalGetStorageArray()
The returned array is expected to contain the elements of the list in an order defined by the
sectionIndices provided by internalGetSectionIndices()
internalGetStorageArray in class AbstractArrayCollection<E>protected abstract int[] internalGetSectionIndices()
Examples:
The trivial example would be {0,size} in case of standard sized array collections.
An example for actual sectioning would be {i,array.length - 1, 0,i - 1} in case of a ring buffer list
comprised of two sections: one ranging from index i to array.length - 1 (with the oldest element located at i)
and one ranging from 0 to i - 1 (with the newest element located at i - 1).
Copyright © 2022 MicroStream Software. All rights reserved.