Interface BigList<K>

All Superinterfaces:
Collection<K>, Iterable<K>, Size64
All Known Subinterfaces:
BooleanBigList, ByteBigList, CharBigList, DoubleBigList, FloatBigList, IntBigList, LongBigList, ObjectBigList<K>, ReferenceBigList<K>, ShortBigList
All Known Implementing Classes:
AbstractBooleanBigList, AbstractBooleanBigList.BooleanRandomAccessSubList, AbstractBooleanBigList.BooleanSubList, AbstractByteBigList, AbstractByteBigList.ByteRandomAccessSubList, AbstractByteBigList.ByteSubList, AbstractCharBigList, AbstractCharBigList.CharRandomAccessSubList, AbstractCharBigList.CharSubList, AbstractDoubleBigList, AbstractDoubleBigList.DoubleRandomAccessSubList, AbstractDoubleBigList.DoubleSubList, AbstractFloatBigList, AbstractFloatBigList.FloatRandomAccessSubList, AbstractFloatBigList.FloatSubList, AbstractIntBigList, AbstractIntBigList.IntRandomAccessSubList, AbstractIntBigList.IntSubList, AbstractLongBigList, AbstractLongBigList.LongRandomAccessSubList, AbstractLongBigList.LongSubList, AbstractObjectBigList, AbstractObjectBigList.ObjectRandomAccessSubList, AbstractObjectBigList.ObjectSubList, AbstractReferenceBigList, AbstractReferenceBigList.ReferenceRandomAccessSubList, AbstractReferenceBigList.ReferenceSubList, AbstractShortBigList, AbstractShortBigList.ShortRandomAccessSubList, AbstractShortBigList.ShortSubList, BooleanBigArrayBigList, BooleanBigLists.EmptyBigList, BooleanBigLists.ListBigList, BooleanBigLists.Singleton, BooleanBigLists.SynchronizedBigList, BooleanBigLists.UnmodifiableBigList, ByteArrayFrontCodedBigList, ByteBigArrayBigList, ByteBigLists.EmptyBigList, ByteBigLists.ListBigList, ByteBigLists.Singleton, ByteBigLists.SynchronizedBigList, ByteBigLists.UnmodifiableBigList, ByteMappedBigList, CharArrayFrontCodedBigList, CharBigArrayBigList, CharBigLists.EmptyBigList, CharBigLists.ListBigList, CharBigLists.Singleton, CharBigLists.SynchronizedBigList, CharBigLists.UnmodifiableBigList, CharMappedBigList, DoubleBigArrayBigList, DoubleBigLists.EmptyBigList, DoubleBigLists.ListBigList, DoubleBigLists.Singleton, DoubleBigLists.SynchronizedBigList, DoubleBigLists.UnmodifiableBigList, DoubleMappedBigList, FloatBigArrayBigList, FloatBigLists.EmptyBigList, FloatBigLists.ListBigList, FloatBigLists.Singleton, FloatBigLists.SynchronizedBigList, FloatBigLists.UnmodifiableBigList, FloatMappedBigList, IntArrayFrontCodedBigList, IntBigArrayBigList, IntBigLists.EmptyBigList, IntBigLists.ListBigList, IntBigLists.Singleton, IntBigLists.SynchronizedBigList, IntBigLists.UnmodifiableBigList, IntMappedBigList, LongArrayFrontCodedBigList, LongBigArrayBigList, LongBigLists.EmptyBigList, LongBigLists.ListBigList, LongBigLists.Singleton, LongBigLists.SynchronizedBigList, LongBigLists.UnmodifiableBigList, LongMappedBigList, ObjectBigArrayBigList, ObjectBigLists.EmptyBigList, ObjectBigLists.ListBigList, ObjectBigLists.Singleton, ObjectBigLists.SynchronizedBigList, ObjectBigLists.UnmodifiableBigList, ReferenceBigArrayBigList, ReferenceBigLists.EmptyBigList, ReferenceBigLists.ListBigList, ReferenceBigLists.Singleton, ReferenceBigLists.SynchronizedBigList, ReferenceBigLists.UnmodifiableBigList, ShortArrayFrontCodedBigList, ShortBigArrayBigList, ShortBigLists.EmptyBigList, ShortBigLists.ListBigList, ShortBigLists.Singleton, ShortBigLists.SynchronizedBigList, ShortBigLists.UnmodifiableBigList, ShortMappedBigList

public interface BigList<K> extends Collection<K>, Size64
A list with big (i.e., 64-bit) indices.

Instances of this class implement the same semantics as that of List: however, getters and setters use long indices, search methods return long values, and iterators are of type BigListIterator.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(long index, K element)
    Inserts the specified element at the specified position in this big list (optional operation).
    boolean
    addAll(long index, Collection<? extends K> c)
    Inserts all of the elements in the specified collection into this big list at the specified position (optional operation).
    get(long index)
    Returns the element at the specified position.
    long
    Returns the index of the first occurrence of the specified element in this big list, or -1 if this big list does not contain the element.
    long
    Returns the index of the last occurrence of the specified element in this big list, or -1 if this big list does not contain the element.
    Returns a big-list iterator over the elements in this big list.
    listIterator(long index)
    Returns a big-list iterator of the elements in this big list, starting at the specified position in this big list.
    remove(long index)
    Removes the element at the specified position.
    set(long index, K element)
    Replaces the element at the specified position in this big list with the specified element (optional operation).
    default int
    Deprecated.
    Use Size64.size64() instead.
    void
    size(long size)
    Sets the size of this big list.
    subList(long from, long to)
    Returns a big sublist view of this big list.

    Methods inherited from interface java.lang.Iterable

    forEach

    Methods inherited from interface it.unimi.dsi.fastutil.Size64

    size64
  • Method Details

    • get

      K get(long index)
      Returns the element at the specified position.
      Parameters:
      index - a position in the big list.
      Returns:
      the element at the specified position.
      See Also:
    • remove

      K remove(long index)
      Removes the element at the specified position.
      Parameters:
      index - a position in the big list.
      Returns:
      the element previously at the specified position.
      See Also:
    • set

      K set(long index, K element)
      Replaces the element at the specified position in this big list with the specified element (optional operation).
      Parameters:
      index - a position in the big list.
      element - the element to be stored at the specified position.
      Returns:
      the element previously at the specified positions.
      See Also:
    • add

      void add(long index, K element)
      Inserts the specified element at the specified position in this big list (optional operation).
      Parameters:
      index - a position in the big list.
      element - an element to be inserted.
      See Also:
    • size

      void size(long size)
      Sets the size of this big 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.
    • addAll

      boolean addAll(long index, Collection<? extends K> c)
      Inserts all of the elements in the specified collection into this big list at the specified position (optional operation).
      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:
    • indexOf

      long indexOf(Object o)
      Returns the index of the first occurrence of the specified element in this big list, or -1 if this big list does not contain the element.
      Parameters:
      o - the object to search for.
      Returns:
      the index of the first occurrence of the specified element in this big list, or -1 if this big list does not contain the element.
      See Also:
    • lastIndexOf

      long lastIndexOf(Object o)
      Returns the index of the last occurrence of the specified element in this big list, or -1 if this big list does not contain the element.
      Parameters:
      o - the object to search for.
      Returns:
      the index of the last occurrence of the specified element in this big list, or -1 if this big list does not contain the element.
      See Also:
    • listIterator

      BigListIterator<K> listIterator()
      Returns a big-list iterator over the elements in this big list.
      Returns:
      a big-list iterator over the elements in this big list.
      See Also:
    • listIterator

      BigListIterator<K> listIterator(long index)
      Returns a big-list iterator of the elements in this big list, starting at the specified position in this big list.
      Parameters:
      index - index of first element to be returned from the big-list iterator.
      Returns:
      a big-list iterator of the elements in this big list, starting at the specified position in this big list.
      See Also:
    • subList

      BigList<K> subList(long from, long to)
      Returns a big sublist view of this big list.
      Parameters:
      from - the starting element (inclusive).
      to - the ending element (exclusive).
      Returns:
      a big sublist view of this big list.
      See Also:
    • size

      @Deprecated default int size()
      Deprecated.
      Use Size64.size64() instead.
      Returns the size of this data structure, minimized with Integer.MAX_VALUE.

      This default implementation follows the definition above, which is compatible with Collection.size().

      Specified by:
      size in interface Collection<K>
      Specified by:
      size in interface Size64
      Returns:
      the size of this data structure, minimized with Integer.MAX_VALUE.
      See Also: