Class LongBigLists.SynchronizedBigList

java.lang.Object
it.unimi.dsi.fastutil.longs.LongBigLists.SynchronizedBigList
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.Size64, Serializable, Comparable<it.unimi.dsi.fastutil.BigList<? extends Long>>, Iterable<Long>, Collection<Long>
Enclosing class:
LongBigLists

public static class LongBigLists.SynchronizedBigList extends Object implements LongBigList, Serializable
A synchronized wrapper class for big lists.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final it.unimi.dsi.fastutil.longs.LongCollection
     
    protected final LongBigList
     
    protected final Object
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
    protected
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    add(long arg0)
     
    void
    add(long i, long k)
    Inserts the specified element at the specified position in this type-specific big list (optional operation).
    void
    add(long i, Long k)
    Deprecated.
    Please use the corresponding type-specific method instead.
    boolean
    add(Long arg0)
    Deprecated.
    boolean
    addAll(long index, LongBigList 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).
    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)
     
    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 arg0)
     
    boolean
    addAll(Collection<? extends Long> arg0)
     
    void
    addElements(long index, long[][] a)
    Add (hopefully quickly) elements to this type-specific big list.
    void
    addElements(long index, long[][] a, long offset, long length)
    Add (hopefully quickly) elements to this type-specific big list.
    void
     
    int
    compareTo(it.unimi.dsi.fastutil.BigList<? extends Long> o)
     
    boolean
    contains(long arg0)
     
    boolean
    Deprecated.
    boolean
    containsAll(it.unimi.dsi.fastutil.longs.LongCollection arg0)
     
    boolean
     
    boolean
     
    void
     
    get(long i)
    Deprecated.
    Please use the corresponding type-specific method instead.
    void
    getElements(long from, long[][] a, long offset, long length)
    Copies (hopefully quickly) elements of this type-specific big list into the given big array.
    long
    getLong(long i)
    Returns the element at the specified position.
    int
     
    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.
    long
    Deprecated.
    Please use the corresponding type-specific method instead.
    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.
    long
    Deprecated.
    Please use the corresponding type-specific method instead.
    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 i)
    Returns a type-specific list iterator on this type-specific big list starting at a given index.
    it.unimi.dsi.fastutil.longs.LongIterator
     
     
    it.unimi.dsi.fastutil.longs.LongSpliterator
     
     
    Deprecated.
    boolean
    rem(long arg0)
     
    remove(long i)
    Deprecated.
    Please use the corresponding type-specific method instead.
    boolean
    remove(Object arg0)
    Deprecated.
    boolean
    removeAll(it.unimi.dsi.fastutil.longs.LongCollection arg0)
     
    boolean
     
    void
    removeElements(long from, long to)
    Removes (hopefully quickly) elements of this type-specific big list.
    boolean
     
    long
    removeLong(long i)
    Removes the element at the specified position.
    boolean
    retainAll(it.unimi.dsi.fastutil.longs.LongCollection arg0)
     
    boolean
     
    long
    set(long i, long k)
    Replaces the element at the specified position in this big list with the specified element (optional operation).
    set(long index, Long k)
    Deprecated.
    Please use the corresponding type-specific method instead.
    int
     
    void
    size(long size)
    Deprecated.
    long
     
    it.unimi.dsi.fastutil.longs.LongSpliterator
     
    Deprecated.
    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.
     
    long[]
    toArray(long[] arg0)
     
    <T> T[]
    toArray(T[] arg0)
     
    long[]
     
    long[]
    toLongArray(long[] arg0)
    Deprecated.
     

    Methods inherited from class java.lang.Object

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

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

    size

    Methods inherited from interface java.util.Collection

    addAll, clear, containsAll, isEmpty, removeAll, retainAll, toArray, toArray, toArray

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

    addAll, addAll, getElements, setElements, setElements, setElements, spliterator

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

    add, add, addAll, contains, contains, containsAll, longIterator, longParallelStream, longSpliterator, longStream, parallelStream, rem, remove, removeAll, removeIf, removeIf, removeIf, retainAll, stream, toArray, toLongArray, toLongArray

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

    forEach, forEach, forEach
  • Field Details

    • list

      protected final LongBigList list
    • collection

      protected final it.unimi.dsi.fastutil.longs.LongCollection collection
    • sync

      protected final Object sync
  • Constructor Details

    • SynchronizedBigList

      protected SynchronizedBigList(LongBigList l, Object sync)
    • SynchronizedBigList

      protected SynchronizedBigList(LongBigList l)
  • Method Details

    • getLong

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

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

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

      public long removeLong(long i)
      Description copied from interface: LongBigList
      Removes the element at the specified position.
      Specified by:
      removeLong in interface LongBigList
      See Also:
      • BigList.remove(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
      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
      See Also:
      • BigList.lastIndexOf(Object)
    • addAll

      public boolean addAll(long index, Collection<? extends Long> c)
      Specified by:
      addAll in interface it.unimi.dsi.fastutil.BigList<Long>
    • getElements

      public void getElements(long from, long[][] a, long offset, long length)
      Description copied from interface: LongBigList
      Copies (hopefully quickly) elements of this type-specific big list into the given big array.
      Specified by:
      getElements in interface LongBigList
      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 interface: LongBigList
      Removes (hopefully quickly) elements of this type-specific big list.
      Specified by:
      removeElements in interface LongBigList
      Parameters:
      from - the start index (inclusive).
      to - the end index (exclusive).
    • addElements

      public void addElements(long index, long[][] a, long offset, long length)
      Description copied from interface: LongBigList
      Add (hopefully quickly) elements to this type-specific big list.
      Specified by:
      addElements in interface LongBigList
      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.
    • addElements

      public void addElements(long index, long[][] a)
      Description copied from interface: LongBigList
      Add (hopefully quickly) elements to this type-specific big list.
      Specified by:
      addElements in interface LongBigList
      Parameters:
      index - the index at which to add elements.
      a - the big array containing the elements.
    • size

      @Deprecated public void size(long size)
      Deprecated.
      Specified by:
      size in interface it.unimi.dsi.fastutil.BigList<Long>
    • size64

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

      public it.unimi.dsi.fastutil.longs.LongBigListIterator iterator()
      Description copied from interface: LongBigList
      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
      See Also:
    • listIterator

      public it.unimi.dsi.fastutil.longs.LongBigListIterator listIterator()
      Description copied from interface: LongBigList
      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
      See Also:
      • BigList.listIterator()
    • listIterator

      public it.unimi.dsi.fastutil.longs.LongBigListIterator listIterator(long i)
      Description copied from interface: LongBigList
      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
      See Also:
      • BigList.listIterator(long)
    • 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
      See Also:
      • BigList.subList(long,long)
    • equals

      public boolean equals(Object o)
      Specified by:
      equals in interface Collection<Long>
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface Collection<Long>
    • compareTo

      public int compareTo(it.unimi.dsi.fastutil.BigList<? extends Long> o)
      Specified by:
      compareTo in interface Comparable<it.unimi.dsi.fastutil.BigList<? extends Long>>
    • addAll

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

      public boolean addAll(long index, LongBigList l)
      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 l)
      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:
    • add

      @Deprecated public void add(long i, Long k)
      Deprecated.
      Please use the corresponding type-specific method instead.
      Specified by:
      add in interface it.unimi.dsi.fastutil.BigList<Long>
      Specified by:
      add in interface LongBigList
    • get

      @Deprecated public Long get(long i)
      Deprecated.
      Please use the corresponding type-specific method instead.
      Specified by:
      get in interface it.unimi.dsi.fastutil.BigList<Long>
      Specified by:
      get in interface LongBigList
    • set

      @Deprecated public Long set(long index, Long k)
      Deprecated.
      Please use the corresponding type-specific method instead.
      Specified by:
      set in interface it.unimi.dsi.fastutil.BigList<Long>
      Specified by:
      set in interface LongBigList
    • remove

      @Deprecated public Long remove(long i)
      Deprecated.
      Please use the corresponding type-specific method instead.
      Specified by:
      remove in interface it.unimi.dsi.fastutil.BigList<Long>
      Specified by:
      remove in interface LongBigList
    • indexOf

      @Deprecated public long indexOf(Object o)
      Deprecated.
      Please use the corresponding type-specific method instead.
      Specified by:
      indexOf in interface it.unimi.dsi.fastutil.BigList<Long>
      Specified by:
      indexOf in interface LongBigList
    • lastIndexOf

      @Deprecated public long lastIndexOf(Object o)
      Deprecated.
      Please use the corresponding type-specific method instead.
      Specified by:
      lastIndexOf in interface it.unimi.dsi.fastutil.BigList<Long>
      Specified by:
      lastIndexOf in interface LongBigList
    • add

      public boolean add(long arg0)
      Specified by:
      add in interface it.unimi.dsi.fastutil.longs.LongCollection
    • contains

      public boolean contains(long arg0)
      Specified by:
      contains in interface it.unimi.dsi.fastutil.longs.LongCollection
    • rem

      public boolean rem(long arg0)
      Specified by:
      rem in interface it.unimi.dsi.fastutil.longs.LongCollection
    • size

      public int size()
      Specified by:
      size in interface Collection<Long>
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface Collection<Long>
    • toLongArray

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

      public Object[] toArray()
      Specified by:
      toArray in interface Collection<Long>
    • toLongArray

      @Deprecated public long[] toLongArray(long[] arg0)
      Deprecated.
      Specified by:
      toLongArray in interface it.unimi.dsi.fastutil.longs.LongCollection
    • toArray

      public long[] toArray(long[] arg0)
      Specified by:
      toArray in interface it.unimi.dsi.fastutil.longs.LongCollection
    • addAll

      public boolean addAll(it.unimi.dsi.fastutil.longs.LongCollection arg0)
      Specified by:
      addAll in interface it.unimi.dsi.fastutil.longs.LongCollection
    • containsAll

      public boolean containsAll(it.unimi.dsi.fastutil.longs.LongCollection arg0)
      Specified by:
      containsAll in interface it.unimi.dsi.fastutil.longs.LongCollection
    • removeAll

      public boolean removeAll(it.unimi.dsi.fastutil.longs.LongCollection arg0)
      Specified by:
      removeAll in interface it.unimi.dsi.fastutil.longs.LongCollection
    • retainAll

      public boolean retainAll(it.unimi.dsi.fastutil.longs.LongCollection arg0)
      Specified by:
      retainAll in interface it.unimi.dsi.fastutil.longs.LongCollection
    • add

      @Deprecated public boolean add(Long arg0)
      Deprecated.
      Specified by:
      add in interface Collection<Long>
      Specified by:
      add in interface it.unimi.dsi.fastutil.longs.LongCollection
    • contains

      @Deprecated public boolean contains(Object arg0)
      Deprecated.
      Specified by:
      contains in interface Collection<Long>
      Specified by:
      contains in interface it.unimi.dsi.fastutil.longs.LongCollection
    • remove

      @Deprecated public boolean remove(Object arg0)
      Deprecated.
      Specified by:
      remove in interface Collection<Long>
      Specified by:
      remove in interface it.unimi.dsi.fastutil.longs.LongCollection
    • longIterator

      public it.unimi.dsi.fastutil.longs.LongIterator longIterator()
      Specified by:
      longIterator in interface it.unimi.dsi.fastutil.longs.LongCollection
      Specified by:
      longIterator in interface it.unimi.dsi.fastutil.longs.LongIterable
    • longSpliterator

      public it.unimi.dsi.fastutil.longs.LongSpliterator longSpliterator()
      Specified by:
      longSpliterator in interface it.unimi.dsi.fastutil.longs.LongCollection
      Specified by:
      longSpliterator in interface it.unimi.dsi.fastutil.longs.LongIterable
    • longStream

      public LongStream longStream()
      Specified by:
      longStream in interface it.unimi.dsi.fastutil.longs.LongCollection
    • longParallelStream

      public LongStream longParallelStream()
      Specified by:
      longParallelStream in interface it.unimi.dsi.fastutil.longs.LongCollection
    • toArray

      public <T> T[] toArray(T[] arg0)
      Specified by:
      toArray in interface Collection<Long>
    • spliterator

      public it.unimi.dsi.fastutil.longs.LongSpliterator spliterator()
      Specified by:
      spliterator in interface Collection<Long>
      Specified by:
      spliterator in interface Iterable<Long>
      Specified by:
      spliterator in interface it.unimi.dsi.fastutil.longs.LongCollection
      Specified by:
      spliterator in interface it.unimi.dsi.fastutil.longs.LongIterable
    • stream

      @Deprecated public Stream<Long> stream()
      Deprecated.
      Specified by:
      stream in interface Collection<Long>
      Specified by:
      stream in interface it.unimi.dsi.fastutil.longs.LongCollection
    • parallelStream

      @Deprecated public Stream<Long> parallelStream()
      Deprecated.
      Specified by:
      parallelStream in interface Collection<Long>
      Specified by:
      parallelStream in interface it.unimi.dsi.fastutil.longs.LongCollection
    • forEach

      public void forEach(LongConsumer arg0)
      Specified by:
      forEach in interface it.unimi.dsi.fastutil.longs.LongIterable
    • addAll

      public boolean addAll(Collection<? extends Long> arg0)
      Specified by:
      addAll in interface Collection<Long>
    • containsAll

      public boolean containsAll(Collection<?> arg0)
      Specified by:
      containsAll in interface Collection<Long>
    • removeAll

      public boolean removeAll(Collection<?> arg0)
      Specified by:
      removeAll in interface Collection<Long>
    • retainAll

      public boolean retainAll(Collection<?> arg0)
      Specified by:
      retainAll in interface Collection<Long>
    • removeIf

      public boolean removeIf(LongPredicate arg0)
      Specified by:
      removeIf in interface it.unimi.dsi.fastutil.longs.LongCollection
    • clear

      public void clear()
      Specified by:
      clear in interface Collection<Long>
    • toString

      public String toString()
      Overrides:
      toString in class Object