Class LongSets.SynchronizedSet

java.lang.Object
it.unimi.dsi.fastutil.longs.LongSets.SynchronizedSet
All Implemented Interfaces:
it.unimi.dsi.fastutil.longs.LongCollection, it.unimi.dsi.fastutil.longs.LongIterable, LongSet, Serializable, Iterable<Long>, Collection<Long>, Set<Long>
Direct Known Subclasses:
LongSortedSets.SynchronizedSortedSet
Enclosing class:
LongSets

public static class LongSets.SynchronizedSet extends Object implements LongSet, Serializable
A synchronized wrapper class for sets.
See Also:
  • Field Details

    • collection

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

      protected final Object sync
  • Constructor Details

    • SynchronizedSet

      protected SynchronizedSet(LongSet s, Object sync)
    • SynchronizedSet

      protected SynchronizedSet(LongSet s)
  • Method Details

    • remove

      public boolean remove(long k)
      Description copied from interface: LongSet
      Removes an element from this set.
      Specified by:
      remove in interface LongSet
      See Also:
    • rem

      @Deprecated public boolean rem(long k)
      Deprecated.
      Description copied from interface: LongSet
      Removes an element from this set.

      This method is inherited from the type-specific collection this type-specific set is based on, but it should not used as this interface reinstates remove() as removal method.

      Specified by:
      rem in interface it.unimi.dsi.fastutil.longs.LongCollection
      Specified by:
      rem in interface LongSet
    • 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
    • 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>
    • iterator

      public it.unimi.dsi.fastutil.longs.LongIterator iterator()
      Specified by:
      iterator in interface Collection<Long>
      Specified by:
      iterator in interface Iterable<Long>
      Specified by:
      iterator in interface it.unimi.dsi.fastutil.longs.LongCollection
      Specified by:
      iterator in interface it.unimi.dsi.fastutil.longs.LongIterable
    • 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
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface Collection<Long>
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object arg0)
      Specified by:
      equals in interface Collection<Long>
      Overrides:
      equals in class Object