Class 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>
  • Constructor Details

  • Method Details

    • internalGetStorageArray

      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.

      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 class AbstractSectionedArrayCollection<E>
      Returns:
      the storage array used by the list, containing all elements in straight order.
    • internalSize

      protected abstract int internalSize()
    • internalGetStorageArray

      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. Note that the calling logic must guarantee the type safety (see calls of this method for examples)
      Parameters:
      subject -