Class AbstractShortBigList.ShortSubList

    • Constructor Detail

      • ShortSubList

        public ShortSubList​(ShortBigList l,
                            long from,
                            long to)
    • Method Detail

      • add

        public boolean add​(short k)
        Description copied from class: AbstractShortBigList
        Ensures that this collection contains the specified element (optional operation).

        This implementation always throws an UnsupportedOperationException.

        This implementation delegates to the type-specific version of BigList.add(long, Object).

        Specified by:
        add in interface ShortCollection
        Overrides:
        add in class AbstractShortBigList
        See Also:
        Collection.add(Object)
      • addAll

        public boolean addAll​(long index,
                              java.util.Collection<? extends java.lang.Short> c)
        Description copied from class: AbstractShortBigList
        Adds all of the elements in the specified collection to this list (optional operation).
        Specified by:
        addAll in interface BigList<java.lang.Short>
        Overrides:
        addAll in class AbstractShortBigList
        Parameters:
        index - index at which to insert the first element from the specified collection.
        c - collection containing elements to be added to this big list.
        Returns:
        true if this big list changed as a result of the call
        See Also:
        List.addAll(int, Collection)
      • set

        public short set​(long index,
                         short k)
        Description copied from class: AbstractShortBigList
        Replaces the element at the specified position in this big list with the specified element (optional operation).

        This implementation always throws an UnsupportedOperationException.

        Specified by:
        set in interface ShortBigList
        Overrides:
        set in class AbstractShortBigList
        See Also:
        BigList.set(long,Object)
      • size64

        public long size64()
        Description copied from interface: Size64
        Returns the size of this data structure as a long.
        Specified by:
        size64 in interface Size64
        Returns:
        the size of this data structure.
      • getElements

        public void getElements​(long from,
                                short[][] a,
                                long offset,
                                long length)
        Description copied from class: AbstractShortBigList
        Copies (hopefully quickly) elements of this type-specific big list into the given big array.

        This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.

        Specified by:
        getElements in interface ShortBigList
        Overrides:
        getElements in class AbstractShortBigList
        Parameters:
        from - the start index (inclusive).
        a - the destination big array.
        offset - the offset into the destination big array where to store the first element copied.
        length - the number of elements to be copied.
      • removeElements

        public void removeElements​(long from,
                                   long to)
        Description copied from class: AbstractShortBigList
        Removes (hopefully quickly) elements of this type-specific big list.

        This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.

        Specified by:
        removeElements in interface ShortBigList
        Overrides:
        removeElements in class AbstractShortBigList
        Parameters:
        from - the start index (inclusive).
        to - the end index (exclusive).
      • addElements

        public void addElements​(long index,
                                short[][] a,
                                long offset,
                                long length)
        Description copied from class: AbstractShortBigList
        Add (hopefully quickly) elements to this type-specific big list.

        This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.

        Specified by:
        addElements in interface ShortBigList
        Overrides:
        addElements in class AbstractShortBigList
        Parameters:
        index - the index at which to add elements.
        a - the big array containing the elements.
        offset - the offset of the first element to add.
        length - the number of elements to add.
      • rem

        public boolean rem​(short k)
        Description copied from class: AbstractShortBigList
        Removes a single instance of the specified element from this collection, if it is present (optional operation).

        This implementation delegates to indexOf().

        Specified by:
        rem in interface ShortCollection
        Overrides:
        rem in class AbstractShortBigList
        See Also:
        Collection.remove(Object)