Interface PrimitiveArray<ArrayType,​BaseType>

    • Method Detail

      • getArray

        ArrayType getArray()
        Gets the fixed-size array backing this instance.
        Returns:
        the backing array
      • setArray

        void setArray​(ArrayType array)
        Sets the fixed-size array backing this instance.
        Parameters:
        array - the new backing array
      • getMaximumGrowth

        int getMaximumGrowth()
        Gets the maximal step size by which to grow the fixed-size array when running out of space.
      • setMaximumGrowth

        void setMaximumGrowth​(int growth)
        Sets the maximal step size by which to grow the fixed-size array when running out of space.
      • copyArray

        ArrayType copyArray()
        Returns a copy of the primitive-array array.

        The returned array is guaranteed to have List.size() elements.

        Returns:
        the fixed-size array
      • capacity

        int capacity()
        Gets the current capacity of the backing array.
      • ensureCapacity

        void ensureCapacity​(int minCapacity)
        Makes sure the backing array at least a specified capacity.

        After calling this method, the internal array will have at least minCapacity elements.

        Parameters:
        minCapacity - the minimum capacity
      • insert

        void insert​(int index,
                    int count)
        Shifts the array to insert space at a specified index.
        Parameters:
        index - the index where the space should be inserted
        count - the number of values to insert
      • delete

        void delete​(int index,
                    int count)
        Shifts the array to delete space starting at a specified index.
        Parameters:
        index - the index where the space should be deleted
        count - the number of values to delete