Interface ObjectBigList<K>

All Superinterfaces:
it.unimi.dsi.fastutil.BigList<K>, Collection<K>, Comparable<it.unimi.dsi.fastutil.BigList<? extends K>>, Iterable<K>, it.unimi.dsi.fastutil.objects.ObjectCollection<K>, it.unimi.dsi.fastutil.objects.ObjectIterable<K>, it.unimi.dsi.fastutil.Size64
All Known Implementing Classes:
AbstractObjectBigList, AbstractObjectBigList.ObjectRandomAccessSubList, AbstractObjectBigList.ObjectSubList, ObjectBigArrayBigList, ObjectBigLists.EmptyBigList, ObjectBigLists.ListBigList, ObjectBigLists.Singleton, ObjectBigLists.SynchronizedBigList, ObjectBigLists.UnmodifiableBigList

public interface ObjectBigList<K> extends it.unimi.dsi.fastutil.BigList<K>, it.unimi.dsi.fastutil.objects.ObjectCollection<K>, Comparable<it.unimi.dsi.fastutil.BigList<? extends K>>
A type-specific BigList; provides some additional methods that use polymorphism to avoid (un)boxing.

Additionally, this interface strengthens iterator(), listIterator(), listIterator(long) and subList(long,long).

Besides polymorphic methods, this interfaces specifies methods to copy into an array or remove contiguous sublists. Although the abstract implementation of this interface provides simple, one-by-one implementations of these methods, it is expected that concrete implementation override them with optimized versions.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    addAll(long index, ObjectBigList<? extends K> l)
    Inserts all of the elements in the specified type-specific big list into this type-specific big list at the specified position (optional operation).
    default boolean
    addAll(long index, it.unimi.dsi.fastutil.objects.ObjectList<? extends K> l)
    Inserts all of the elements in the specified type-specific list into this type-specific big list at the specified position (optional operation).
    default boolean
    addAll(ObjectBigList<? extends K> l)
    Appends all of the elements in the specified type-specific big list to the end of this type-specific big list (optional operation).
    default boolean
    addAll(it.unimi.dsi.fastutil.objects.ObjectList<? extends K> l)
    Appends all of the elements in the specified type-specific list to the end of this type-specific big list (optional operation).
    void
    addElements(long index, K[][] a)
    Add (hopefully quickly) elements to this type-specific big list.
    void
    addElements(long index, K[][] a, long offset, long length)
    Add (hopefully quickly) elements to this type-specific big list.
    void
    getElements(long from, Object[][] a, long offset, long length)
    Copies (hopefully quickly) elements of this type-specific big list into the given big array.
    default void
    getElements(long from, Object[] a, int offset, int length)
    Copies (hopefully quickly) elements of this type-specific big list into the given array.
    it.unimi.dsi.fastutil.objects.ObjectBigListIterator<K>
    Returns a type-specific iterator on the elements of this list.
    it.unimi.dsi.fastutil.objects.ObjectBigListIterator<K>
    Returns a type-specific big-list iterator on this type-specific big list.
    it.unimi.dsi.fastutil.objects.ObjectBigListIterator<K>
    listIterator(long index)
    Returns a type-specific list iterator on this type-specific big list starting at a given index.
    void
    removeElements(long from, long to)
    Removes (hopefully quickly) elements of this type-specific big list.
    default void
    setElements(long index, K[][] a)
    Set (hopefully quickly) elements to match the array given.
    default void
    setElements(long index, K[][] a, long offset, long length)
    Set (hopefully quickly) elements to match the array given.
    default void
    setElements(K[][] a)
    Set (hopefully quickly) elements to match the array given.
    default it.unimi.dsi.fastutil.objects.ObjectSpliterator<K>
    Returns a type-specific spliterator on the elements of this big-list.
    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.

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

    add, addAll, get, indexOf, lastIndexOf, remove, set, size, size

    Methods inherited from interface java.lang.Comparable

    compareTo

    Methods inherited from interface java.lang.Iterable

    forEach

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

    size64
  • Method Details

    • iterator

      it.unimi.dsi.fastutil.objects.ObjectBigListIterator<K> iterator()
      Returns a type-specific iterator on the elements of this list.
      Specified by:
      iterator in interface Collection<K>
      Specified by:
      iterator in interface Iterable<K>
      Specified by:
      iterator in interface it.unimi.dsi.fastutil.objects.ObjectCollection<K>
      Specified by:
      iterator in interface it.unimi.dsi.fastutil.objects.ObjectIterable<K>
      See Also:
    • listIterator

      it.unimi.dsi.fastutil.objects.ObjectBigListIterator<K> listIterator()
      Returns a type-specific big-list iterator on this type-specific big list.
      Specified by:
      listIterator in interface it.unimi.dsi.fastutil.BigList<K>
      See Also:
      • BigList.listIterator()
    • listIterator

      it.unimi.dsi.fastutil.objects.ObjectBigListIterator<K> listIterator(long index)
      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<K>
      See Also:
      • BigList.listIterator(long)
    • spliterator

      default it.unimi.dsi.fastutil.objects.ObjectSpliterator<K> spliterator()
      Returns a type-specific spliterator on the elements of this big-list.

      BigList spliterators must report at least Spliterator.SIZED and Spliterator.ORDERED.

      See List.spliterator() for more documentation on the requirements of the returned spliterator (despite BigList not being a List, most of the same requirements apply.

      Specified by:
      spliterator in interface Collection<K>
      Specified by:
      spliterator in interface Iterable<K>
      Specified by:
      spliterator in interface it.unimi.dsi.fastutil.objects.ObjectCollection<K>
      Specified by:
      spliterator in interface it.unimi.dsi.fastutil.objects.ObjectIterable<K>
      Returns:
      Since:
      8.5.0
    • subList

      ObjectBigList<K> 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.
      Specified by:
      subList in interface it.unimi.dsi.fastutil.BigList<K>
      See Also:
      • BigList.subList(long,long)
    • getElements

      void getElements(long from, Object[][] a, long offset, long length)
      Copies (hopefully quickly) elements of this type-specific big list into the given big array.
      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.
    • getElements

      default void getElements(long from, Object[] a, int offset, int length)
      Copies (hopefully quickly) elements of this type-specific big 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(long from, long to)
      Removes (hopefully quickly) elements of this type-specific big list.
      Parameters:
      from - the start index (inclusive).
      to - the end index (exclusive).
    • addElements

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

      void addElements(long index, K[][] a, long offset, long length)
      Add (hopefully quickly) elements to this type-specific big list.
      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.
    • setElements

      default void setElements(K[][] a)
      Set (hopefully quickly) elements to match the array given.
      Parameters:
      a - the big array containing the elements.
      Since:
      8.5.0
    • setElements

      default void setElements(long index, K[][] a)
      Set (hopefully quickly) elements to match the array given.
      Parameters:
      index - the index at which to start setting elements.
      a - the big array containing the elements.
      Since:
      8.5.0
    • setElements

      default void setElements(long index, K[][] a, long offset, long length)
      Set (hopefully quickly) elements to match the array given. Sets each in this list to the corresponding elements in the array, as if by
       ListIterator iter = listIterator(index);
       long i = 0;
       while (i < length) {
         iter.next();
         iter.set(BigArrays.get(a, offset + i++);
       }
       
      However, the exact implementation may be more efficient, taking into account whether random access is faster or not, or at the discretion of subclasses, abuse internals.
      Parameters:
      index - the index at which to start setting elements.
      a - the big array containing the elements.
      offset - the offset of the first element to add.
      length - the number of elements to add.
      Since:
      8.5.0
    • addAll

      default boolean addAll(long index, ObjectBigList<? extends K> l)
      Inserts all of the elements in the specified type-specific big list into this type-specific big list at the specified position (optional operation).
      See Also:
      • BigList.addAll(long,Collection)
    • addAll

      default boolean addAll(ObjectBigList<? extends K> l)
      Appends all of the elements in the specified type-specific big list to the end of this type-specific big list (optional operation).
      See Also:
    • addAll

      default boolean addAll(long index, it.unimi.dsi.fastutil.objects.ObjectList<? extends K> l)
      Inserts all of the elements in the specified type-specific list into this type-specific big list at the specified position (optional operation).
      See Also:
      • BigList.addAll(long,Collection)
    • addAll

      default boolean addAll(it.unimi.dsi.fastutil.objects.ObjectList<? extends K> l)
      Appends all of the elements in the specified type-specific list to the end of this type-specific big list (optional operation).
      See Also: