Interface ObjectList<K>

    • Method Detail

      • subList

        ObjectList<K> subList​(int from,
                              int to)
        Returns a type-specific view of the portion of this list from the index from, inclusive, to the index to, exclusive.

        Note that this specification strengthens the one given in List.subList(int,int).

        Specified by:
        subList in interface List<K>
        See Also:
        List.subList(int,int)
      • size

        void size​(int size)
        Sets the size of this list.

        If the specified size is smaller than the current size, the last elements are discarded. Otherwise, they are filled with 0/null/false.

        Parameters:
        size - the new size.
      • getElements

        void getElements​(int from,
                         Object[] a,
                         int offset,
                         int length)
        Copies (hopefully quickly) elements of this type-specific list into the given array.
        Parameters:
        from - the start index (inclusive).
        a - the destination array.
        offset - the offset into the destination array where to store the first element copied.
        length - the number of elements to be copied.
      • removeElements

        void removeElements​(int from,
                            int to)
        Removes (hopefully quickly) elements of this type-specific list.
        Parameters:
        from - the start index (inclusive).
        to - the end index (exclusive).
      • addElements

        void addElements​(int index,
                         K[] a)
        Add (hopefully quickly) elements to this type-specific list.
        Parameters:
        index - the index at which to add elements.
        a - the array containing the elements.
      • addElements

        void addElements​(int index,
                         K[] a,
                         int offset,
                         int length)
        Add (hopefully quickly) elements to this type-specific list.
        Parameters:
        index - the index at which to add elements.
        a - the array containing the elements.
        offset - the offset of the first element to add.
        length - the number of elements to add.