Class LongBigLists.ListBigList

java.lang.Object
java.util.AbstractCollection<Long>
it.unimi.dsi.fastutil.longs.AbstractLongCollection
it.unimi.dsi.fastutil.longs.AbstractLongBigList
it.unimi.dsi.fastutil.longs.LongBigLists.ListBigList
All Implemented Interfaces:
it.unimi.dsi.fastutil.BigList<Long>, LongBigList, it.unimi.dsi.fastutil.longs.LongCollection, it.unimi.dsi.fastutil.longs.LongIterable, it.unimi.dsi.fastutil.longs.LongStack, it.unimi.dsi.fastutil.Size64, it.unimi.dsi.fastutil.Stack<Long>, Serializable, Comparable<it.unimi.dsi.fastutil.BigList<? extends Long>>, Iterable<Long>, Collection<Long>
Enclosing class:
LongBigLists

public static class LongBigLists.ListBigList extends AbstractLongBigList 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.longs.AbstractLongBigList

    AbstractLongBigList.LongRandomAccessSubList, AbstractLongBigList.LongSubList
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    boolean
    add(long key)
    void
    add(long index, long key)
    Inserts the specified element at the specified position in this type-specific big list (optional operation).
    boolean
    addAll(long index, LongBigList 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.longs.LongCollection 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 Long> 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.longs.LongCollection c)
    boolean
    addAll(Collection<? extends Long> c)
    void
    boolean
    contains(long key)
    Returns true if this list contains the specified element.
    boolean
    containsAll(it.unimi.dsi.fastutil.longs.LongCollection c)
     
    boolean
     
    long
    getLong(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(long 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.longs.LongBigListIterator
    Returns a type-specific iterator on the elements of this list.
    long
    lastIndexOf(long 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.longs.LongBigListIterator
    Returns a type-specific big-list iterator on this type-specific big list.
    it.unimi.dsi.fastutil.longs.LongBigListIterator
    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.longs.LongCollection c)
     
    boolean
     
    void
    removeElements(long from, long to)
    Removes (hopefully quickly) elements of this type-specific big list.
    long
    removeLong(long index)
    Removes the element at the specified position.
    boolean
    retainAll(it.unimi.dsi.fastutil.longs.LongCollection c)
     
    boolean
     
    long
    set(long index, long 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)
     
    long[]
     
    long[]
    toLongArray(long[] a)
    Deprecated.

    Methods inherited from class it.unimi.dsi.fastutil.longs.AbstractLongCollection

    add, contains, forEach, remove, removeIf, 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.longs.LongBigList

    addAll, addAll, getElements, setElements, setElements, spliterator

    Methods inherited from interface it.unimi.dsi.fastutil.longs.LongCollection

    add, contains, longIterator, longParallelStream, longSpliterator, longStream, parallelStream, remove, removeIf, removeIf, removeIf, stream, toArray

    Methods inherited from interface it.unimi.dsi.fastutil.longs.LongIterable

    forEach, forEach
  • Constructor Details

    • ListBigList

      protected ListBigList(it.unimi.dsi.fastutil.longs.LongList 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<Long>
      Overrides:
      size in class AbstractLongBigList
    • iterator

      public it.unimi.dsi.fastutil.longs.LongBigListIterator iterator()
      Description copied from class: AbstractLongBigList
      Returns a type-specific iterator on the elements of this list.
      Specified by:
      iterator in interface Collection<Long>
      Specified by:
      iterator in interface Iterable<Long>
      Specified by:
      iterator in interface LongBigList
      Specified by:
      iterator in interface it.unimi.dsi.fastutil.longs.LongCollection
      Specified by:
      iterator in interface it.unimi.dsi.fastutil.longs.LongIterable
      Overrides:
      iterator in class AbstractLongBigList
      See Also:
    • listIterator

      public it.unimi.dsi.fastutil.longs.LongBigListIterator listIterator()
      Description copied from class: AbstractLongBigList
      Returns a type-specific big-list iterator on this type-specific big list.
      Specified by:
      listIterator in interface it.unimi.dsi.fastutil.BigList<Long>
      Specified by:
      listIterator in interface LongBigList
      Overrides:
      listIterator in class AbstractLongBigList
      See Also:
      • BigList.listIterator()
    • listIterator

      public it.unimi.dsi.fastutil.longs.LongBigListIterator listIterator(long index)
      Description copied from class: AbstractLongBigList
      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<Long>
      Specified by:
      listIterator in interface LongBigList
      Overrides:
      listIterator in class AbstractLongBigList
      See Also:
      • BigList.listIterator(long)
    • addAll

      public boolean addAll(long index, Collection<? extends Long> c)
      Description copied from class: AbstractLongBigList
      Adds all of the elements in the specified collection to this list (optional operation).
      Specified by:
      addAll in interface it.unimi.dsi.fastutil.BigList<Long>
      Overrides:
      addAll in class AbstractLongBigList
    • subList

      public LongBigList subList(long from, long to)
      Description copied from interface: LongBigList
      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<Long>
      Specified by:
      subList in interface LongBigList
      Overrides:
      subList in class AbstractLongBigList
      See Also:
      • BigList.subList(long,long)
    • contains

      public boolean contains(long key)
      Description copied from class: AbstractLongBigList
      Returns true if this list contains the specified element.
      Specified by:
      contains in interface it.unimi.dsi.fastutil.longs.LongCollection
      Overrides:
      contains in class AbstractLongBigList
      See Also:
    • toLongArray

      public long[] toLongArray()
      Specified by:
      toLongArray in interface it.unimi.dsi.fastutil.longs.LongCollection
      Overrides:
      toLongArray in class it.unimi.dsi.fastutil.longs.AbstractLongCollection
    • removeElements

      public void removeElements(long from, long to)
      Description copied from class: AbstractLongBigList
      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 LongBigList
      Overrides:
      removeElements in class AbstractLongBigList
      Parameters:
      from - the start index (inclusive).
      to - the end index (exclusive).
    • toLongArray

      @Deprecated public long[] toLongArray(long[] a)
      Deprecated.
      Specified by:
      toLongArray in interface it.unimi.dsi.fastutil.longs.LongCollection
      Overrides:
      toLongArray in class it.unimi.dsi.fastutil.longs.AbstractLongCollection
    • addAll

      public boolean addAll(long index, it.unimi.dsi.fastutil.longs.LongCollection c)
      Description copied from class: AbstractLongBigList
      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 LongBigList
      Overrides:
      addAll in class AbstractLongBigList
      See Also:
    • addAll

      public boolean addAll(it.unimi.dsi.fastutil.longs.LongCollection c)
      Description copied from class: AbstractLongBigList
      Specified by:
      addAll in interface it.unimi.dsi.fastutil.longs.LongCollection
      Overrides:
      addAll in class AbstractLongBigList
    • addAll

      public boolean addAll(long index, LongBigList c)
      Description copied from interface: LongBigList
      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 LongBigList
      See Also:
      • BigList.addAll(long,Collection)
    • addAll

      public boolean addAll(LongBigList c)
      Description copied from interface: LongBigList
      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 LongBigList
      See Also:
    • containsAll

      public boolean containsAll(it.unimi.dsi.fastutil.longs.LongCollection c)
      Specified by:
      containsAll in interface it.unimi.dsi.fastutil.longs.LongCollection
      Overrides:
      containsAll in class it.unimi.dsi.fastutil.longs.AbstractLongCollection
    • removeAll

      public boolean removeAll(it.unimi.dsi.fastutil.longs.LongCollection c)
      Specified by:
      removeAll in interface it.unimi.dsi.fastutil.longs.LongCollection
      Overrides:
      removeAll in class it.unimi.dsi.fastutil.longs.AbstractLongCollection
    • retainAll

      public boolean retainAll(it.unimi.dsi.fastutil.longs.LongCollection c)
      Specified by:
      retainAll in interface it.unimi.dsi.fastutil.longs.LongCollection
      Overrides:
      retainAll in class it.unimi.dsi.fastutil.longs.AbstractLongCollection
    • add

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

      public boolean add(long key)
      Description copied from class: AbstractLongBigList
      Specified by:
      add in interface it.unimi.dsi.fastutil.longs.LongCollection
      Overrides:
      add in class AbstractLongBigList
    • getLong

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

      public long indexOf(long k)
      Description copied from interface: LongBigList
      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 LongBigList
      Overrides:
      indexOf in class AbstractLongBigList
      See Also:
      • BigList.indexOf(Object)
    • lastIndexOf

      public long lastIndexOf(long k)
      Description copied from interface: LongBigList
      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 LongBigList
      Overrides:
      lastIndexOf in class AbstractLongBigList
      See Also:
      • BigList.lastIndexOf(Object)
    • removeLong

      public long removeLong(long index)
      Description copied from class: AbstractLongBigList
      Removes the element at the specified position.
      Specified by:
      removeLong in interface LongBigList
      Overrides:
      removeLong in class AbstractLongBigList
      See Also:
      • BigList.remove(long)
    • set

      public long set(long index, long k)
      Description copied from class: AbstractLongBigList
      Replaces the element at the specified position in this big list with the specified element (optional operation).
      Specified by:
      set in interface LongBigList
      Overrides:
      set in class AbstractLongBigList
      See Also:
      • BigList.set(long,Object)
    • isEmpty

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

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

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

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

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

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

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

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