Class ShortBigLists.ListBigList

java.lang.Object
java.util.AbstractCollection<Short>
it.unimi.dsi.fastutil.shorts.AbstractShortCollection
it.unimi.dsi.fastutil.shorts.AbstractShortBigList
it.unimi.dsi.fastutil.shorts.ShortBigLists.ListBigList
All Implemented Interfaces:
it.unimi.dsi.fastutil.BigList<Short>, ShortBigList, it.unimi.dsi.fastutil.shorts.ShortCollection, it.unimi.dsi.fastutil.shorts.ShortIterable, it.unimi.dsi.fastutil.shorts.ShortStack, it.unimi.dsi.fastutil.Size64, it.unimi.dsi.fastutil.Stack<Short>, Serializable, Comparable<it.unimi.dsi.fastutil.BigList<? extends Short>>, Iterable<Short>, Collection<Short>
Enclosing class:
ShortBigLists

public static class ShortBigLists.ListBigList extends AbstractShortBigList implements Serializable
A class exposing a list as a big list.
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class it.unimi.dsi.fastutil.shorts.AbstractShortBigList

    AbstractShortBigList.ShortRandomAccessSubList, AbstractShortBigList.ShortSubList
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    ListBigList(it.unimi.dsi.fastutil.shorts.ShortList list)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(long index, short key)
    Inserts the specified element at the specified position in this type-specific big list (optional operation).
    boolean
    add(short key)
    boolean
    addAll(long index, ShortBigList c)
    Inserts all of the elements in the specified type-specific big list into this type-specific big list at the specified position (optional operation).
    boolean
    addAll(long index, it.unimi.dsi.fastutil.shorts.ShortCollection c)
    Inserts all of the elements in the specified type-specific collection into this type-specific big list at the specified position (optional operation).
    boolean
    addAll(long index, Collection<? extends Short> c)
    Adds all of the elements in the specified collection to this list (optional operation).
    boolean
    Appends all of the elements in the specified type-specific big list to the end of this type-specific big list (optional operation).
    boolean
    addAll(it.unimi.dsi.fastutil.shorts.ShortCollection c)
    boolean
    addAll(Collection<? extends Short> c)
    void
    boolean
    contains(short key)
    Returns true if this list contains the specified element.
    boolean
    containsAll(it.unimi.dsi.fastutil.shorts.ShortCollection c)
     
    boolean
     
    short
    getShort(long index)
    Returns the element at the specified position.
    int
    Returns the hash code for this big list, which is identical to List.hashCode().
    long
    indexOf(short k)
    Returns the index of the first occurrence of the specified element in this type-specific big list, or -1 if this big list does not contain the element.
    boolean
     
    it.unimi.dsi.fastutil.shorts.ShortBigListIterator
    Returns a type-specific iterator on the elements of this list.
    long
    lastIndexOf(short k)
    Returns the index of the last occurrence of the specified element in this type-specific big list, or -1 if this big list does not contain the element.
    it.unimi.dsi.fastutil.shorts.ShortBigListIterator
    Returns a type-specific big-list iterator on this type-specific big list.
    it.unimi.dsi.fastutil.shorts.ShortBigListIterator
    listIterator(long index)
    Returns a type-specific list iterator on this type-specific big list starting at a given index.
    boolean
    removeAll(it.unimi.dsi.fastutil.shorts.ShortCollection c)
     
    boolean
     
    void
    removeElements(long from, long to)
    Removes (hopefully quickly) elements of this type-specific big list.
    short
    removeShort(long index)
    Removes the element at the specified position.
    boolean
    retainAll(it.unimi.dsi.fastutil.shorts.ShortCollection c)
     
    boolean
     
    short
    set(long index, short k)
    Replaces the element at the specified position in this big list with the specified element (optional operation).
    void
    size(long size)
     
    long
     
    subList(long from, long to)
    Returns a type-specific view of the portion of this type-specific big list from the index from, inclusive, to the index to, exclusive.
    <T> T[]
    toArray(T[] a)
     
    short[]
     
    short[]
    toShortArray(short[] a)
    Deprecated.

    Methods inherited from class it.unimi.dsi.fastutil.shorts.AbstractShortCollection

    add, contains, remove, toArray

    Methods inherited from class java.util.AbstractCollection

    toArray

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface java.util.Collection

    toArray, toArray

    Methods inherited from interface it.unimi.dsi.fastutil.shorts.ShortBigList

    addAll, addAll, getElements, setElements, setElements, spliterator

    Methods inherited from interface it.unimi.dsi.fastutil.shorts.ShortCollection

    add, contains, intIterator, intParallelStream, intStream, parallelStream, remove, removeIf, removeIf, removeIf, stream, toArray

    Methods inherited from interface it.unimi.dsi.fastutil.shorts.ShortIterable

    forEach, forEach
  • Constructor Details

    • ListBigList

      protected ListBigList(it.unimi.dsi.fastutil.shorts.ShortList list)
  • Method Details

    • size64

      public long size64()
      Specified by:
      size64 in interface it.unimi.dsi.fastutil.Size64
    • size

      public void size(long size)
      Specified by:
      size in interface it.unimi.dsi.fastutil.BigList<Short>
      Overrides:
      size in class AbstractShortBigList
    • iterator

      public it.unimi.dsi.fastutil.shorts.ShortBigListIterator iterator()
      Description copied from class: AbstractShortBigList
      Returns a type-specific iterator on the elements of this list.
      Specified by:
      iterator in interface Collection<Short>
      Specified by:
      iterator in interface Iterable<Short>
      Specified by:
      iterator in interface ShortBigList
      Specified by:
      iterator in interface it.unimi.dsi.fastutil.shorts.ShortCollection
      Specified by:
      iterator in interface it.unimi.dsi.fastutil.shorts.ShortIterable
      Overrides:
      iterator in class AbstractShortBigList
      See Also:
    • listIterator

      public it.unimi.dsi.fastutil.shorts.ShortBigListIterator listIterator()
      Description copied from class: AbstractShortBigList
      Returns a type-specific big-list iterator on this type-specific big list.
      Specified by:
      listIterator in interface it.unimi.dsi.fastutil.BigList<Short>
      Specified by:
      listIterator in interface ShortBigList
      Overrides:
      listIterator in class AbstractShortBigList
      See Also:
      • BigList.listIterator()
    • listIterator

      public it.unimi.dsi.fastutil.shorts.ShortBigListIterator listIterator(long index)
      Description copied from class: AbstractShortBigList
      Returns a type-specific list iterator on this type-specific big list starting at a given index.
      Specified by:
      listIterator in interface it.unimi.dsi.fastutil.BigList<Short>
      Specified by:
      listIterator in interface ShortBigList
      Overrides:
      listIterator in class AbstractShortBigList
      See Also:
      • BigList.listIterator(long)
    • addAll

      public boolean addAll(long index, Collection<? extends 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 it.unimi.dsi.fastutil.BigList<Short>
      Overrides:
      addAll in class AbstractShortBigList
    • subList

      public ShortBigList subList(long from, long to)
      Description copied from interface: ShortBigList
      Returns a type-specific view of the portion of this type-specific big list from the index from, inclusive, to the index to, exclusive.
      Specified by:
      subList in interface it.unimi.dsi.fastutil.BigList<Short>
      Specified by:
      subList in interface ShortBigList
      Overrides:
      subList in class AbstractShortBigList
      See Also:
      • BigList.subList(long,long)
    • contains

      public boolean contains(short key)
      Description copied from class: AbstractShortBigList
      Returns true if this list contains the specified element.
      Specified by:
      contains in interface it.unimi.dsi.fastutil.shorts.ShortCollection
      Overrides:
      contains in class AbstractShortBigList
      See Also:
    • toShortArray

      public short[] toShortArray()
      Specified by:
      toShortArray in interface it.unimi.dsi.fastutil.shorts.ShortCollection
      Overrides:
      toShortArray in class it.unimi.dsi.fastutil.shorts.AbstractShortCollection
    • 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).
    • toShortArray

      @Deprecated public short[] toShortArray(short[] a)
      Deprecated.
      Specified by:
      toShortArray in interface it.unimi.dsi.fastutil.shorts.ShortCollection
      Overrides:
      toShortArray in class it.unimi.dsi.fastutil.shorts.AbstractShortCollection
    • addAll

      public boolean addAll(long index, it.unimi.dsi.fastutil.shorts.ShortCollection c)
      Description copied from class: AbstractShortBigList
      Inserts all of the elements in the specified type-specific collection into this type-specific big list at the specified position (optional operation).
      Specified by:
      addAll in interface ShortBigList
      Overrides:
      addAll in class AbstractShortBigList
      See Also:
    • addAll

      public boolean addAll(it.unimi.dsi.fastutil.shorts.ShortCollection c)
      Description copied from class: AbstractShortBigList
      Specified by:
      addAll in interface it.unimi.dsi.fastutil.shorts.ShortCollection
      Overrides:
      addAll in class AbstractShortBigList
    • addAll

      public boolean addAll(long index, ShortBigList c)
      Description copied from interface: ShortBigList
      Inserts all of the elements in the specified type-specific big list into this type-specific big list at the specified position (optional operation).
      Specified by:
      addAll in interface ShortBigList
      See Also:
      • BigList.addAll(long,Collection)
    • addAll

      public boolean addAll(ShortBigList c)
      Description copied from interface: ShortBigList
      Appends all of the elements in the specified type-specific big list to the end of this type-specific big list (optional operation).
      Specified by:
      addAll in interface ShortBigList
      See Also:
    • containsAll

      public boolean containsAll(it.unimi.dsi.fastutil.shorts.ShortCollection c)
      Specified by:
      containsAll in interface it.unimi.dsi.fastutil.shorts.ShortCollection
      Overrides:
      containsAll in class it.unimi.dsi.fastutil.shorts.AbstractShortCollection
    • removeAll

      public boolean removeAll(it.unimi.dsi.fastutil.shorts.ShortCollection c)
      Specified by:
      removeAll in interface it.unimi.dsi.fastutil.shorts.ShortCollection
      Overrides:
      removeAll in class it.unimi.dsi.fastutil.shorts.AbstractShortCollection
    • retainAll

      public boolean retainAll(it.unimi.dsi.fastutil.shorts.ShortCollection c)
      Specified by:
      retainAll in interface it.unimi.dsi.fastutil.shorts.ShortCollection
      Overrides:
      retainAll in class it.unimi.dsi.fastutil.shorts.AbstractShortCollection
    • add

      public void add(long index, short key)
      Description copied from class: AbstractShortBigList
      Inserts the specified element at the specified position in this type-specific big list (optional operation).
      Specified by:
      add in interface ShortBigList
      Overrides:
      add in class AbstractShortBigList
      See Also:
      • BigList.add(long,Object)
    • add

      public boolean add(short key)
      Description copied from class: AbstractShortBigList
      Specified by:
      add in interface it.unimi.dsi.fastutil.shorts.ShortCollection
      Overrides:
      add in class AbstractShortBigList
    • getShort

      public short getShort(long index)
      Description copied from interface: ShortBigList
      Returns the element at the specified position.
      Specified by:
      getShort in interface ShortBigList
      See Also:
      • BigList.get(long)
    • indexOf

      public long indexOf(short k)
      Description copied from interface: ShortBigList
      Returns the index of the first occurrence of the specified element in this type-specific big list, or -1 if this big list does not contain the element.
      Specified by:
      indexOf in interface ShortBigList
      Overrides:
      indexOf in class AbstractShortBigList
      See Also:
      • BigList.indexOf(Object)
    • lastIndexOf

      public long lastIndexOf(short k)
      Description copied from interface: ShortBigList
      Returns the index of the last occurrence of the specified element in this type-specific big list, or -1 if this big list does not contain the element.
      Specified by:
      lastIndexOf in interface ShortBigList
      Overrides:
      lastIndexOf in class AbstractShortBigList
      See Also:
      • BigList.lastIndexOf(Object)
    • removeShort

      public short removeShort(long index)
      Description copied from class: AbstractShortBigList
      Removes the element at the specified position.
      Specified by:
      removeShort in interface ShortBigList
      Overrides:
      removeShort in class AbstractShortBigList
      See Also:
      • BigList.remove(long)
    • 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).
      Specified by:
      set in interface ShortBigList
      Overrides:
      set in class AbstractShortBigList
      See Also:
      • BigList.set(long,Object)
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface Collection<Short>
      Specified by:
      isEmpty in interface it.unimi.dsi.fastutil.Stack<Short>
      Overrides:
      isEmpty in class AbstractCollection<Short>
    • toArray

      public <T> T[] toArray(T[] a)
      Specified by:
      toArray in interface Collection<Short>
      Overrides:
      toArray in class AbstractCollection<Short>
    • containsAll

      public boolean containsAll(Collection<?> c)
      Specified by:
      containsAll in interface Collection<Short>
      Overrides:
      containsAll in class it.unimi.dsi.fastutil.shorts.AbstractShortCollection
    • addAll

      public boolean addAll(Collection<? extends Short> c)
      Description copied from class: AbstractShortBigList
      Specified by:
      addAll in interface Collection<Short>
      Overrides:
      addAll in class AbstractShortBigList
    • removeAll

      public boolean removeAll(Collection<?> c)
      Specified by:
      removeAll in interface Collection<Short>
      Overrides:
      removeAll in class it.unimi.dsi.fastutil.shorts.AbstractShortCollection
    • retainAll

      public boolean retainAll(Collection<?> c)
      Specified by:
      retainAll in interface Collection<Short>
      Overrides:
      retainAll in class it.unimi.dsi.fastutil.shorts.AbstractShortCollection
    • clear

      public void clear()
      Description copied from class: AbstractShortBigList
      Specified by:
      clear in interface Collection<Short>
      Overrides:
      clear in class AbstractShortBigList
    • hashCode

      public int hashCode()
      Description copied from class: AbstractShortBigList
      Returns the hash code for this big list, which is identical to List.hashCode().
      Specified by:
      hashCode in interface Collection<Short>
      Overrides:
      hashCode in class AbstractShortBigList
      Returns:
      the hash code for this big list.