Class IntSets.SynchronizedSet

java.lang.Object
it.unimi.dsi.fastutil.ints.IntSets.SynchronizedSet
All Implemented Interfaces:
it.unimi.dsi.fastutil.ints.IntCollection, it.unimi.dsi.fastutil.ints.IntIterable, IntSet, Serializable, Iterable<Integer>, Collection<Integer>, Set<Integer>
Direct Known Subclasses:
IntSortedSets.SynchronizedSortedSet
Enclosing class:
IntSets

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

    • collection

      protected final it.unimi.dsi.fastutil.ints.IntCollection collection
    • sync

      protected final Object sync
  • Constructor Details

    • SynchronizedSet

      protected SynchronizedSet(IntSet s, Object sync)
    • SynchronizedSet

      protected SynchronizedSet(IntSet s)
  • Method Details

    • remove

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

      @Deprecated public boolean rem(int k)
      Deprecated.
      Description copied from interface: IntSet
      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.ints.IntCollection
      Specified by:
      rem in interface IntSet
    • add

      public boolean add(int arg0)
      Specified by:
      add in interface it.unimi.dsi.fastutil.ints.IntCollection
    • contains

      public boolean contains(int arg0)
      Specified by:
      contains in interface it.unimi.dsi.fastutil.ints.IntCollection
    • size

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

      public boolean isEmpty()
      Specified by:
      isEmpty in interface Collection<Integer>
    • toIntArray

      public int[] toIntArray()
      Specified by:
      toIntArray in interface it.unimi.dsi.fastutil.ints.IntCollection
    • toArray

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

      @Deprecated public int[] toIntArray(int[] arg0)
      Deprecated.
      Specified by:
      toIntArray in interface it.unimi.dsi.fastutil.ints.IntCollection
    • toArray

      public int[] toArray(int[] arg0)
      Specified by:
      toArray in interface it.unimi.dsi.fastutil.ints.IntCollection
    • addAll

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

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

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

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

      @Deprecated public boolean add(Integer arg0)
      Deprecated.
      Specified by:
      add in interface Collection<Integer>
      Specified by:
      add in interface it.unimi.dsi.fastutil.ints.IntCollection
    • contains

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

      @Deprecated public boolean remove(Object arg0)
      Deprecated.
      Specified by:
      remove in interface Collection<Integer>
      Specified by:
      remove in interface it.unimi.dsi.fastutil.ints.IntCollection
    • intIterator

      public it.unimi.dsi.fastutil.ints.IntIterator intIterator()
      Specified by:
      intIterator in interface it.unimi.dsi.fastutil.ints.IntCollection
      Specified by:
      intIterator in interface it.unimi.dsi.fastutil.ints.IntIterable
    • intSpliterator

      public it.unimi.dsi.fastutil.ints.IntSpliterator intSpliterator()
      Specified by:
      intSpliterator in interface it.unimi.dsi.fastutil.ints.IntCollection
      Specified by:
      intSpliterator in interface it.unimi.dsi.fastutil.ints.IntIterable
    • intStream

      public IntStream intStream()
      Specified by:
      intStream in interface it.unimi.dsi.fastutil.ints.IntCollection
    • intParallelStream

      public IntStream intParallelStream()
      Specified by:
      intParallelStream in interface it.unimi.dsi.fastutil.ints.IntCollection
    • toArray

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

      public it.unimi.dsi.fastutil.ints.IntIterator iterator()
      Specified by:
      iterator in interface Collection<Integer>
      Specified by:
      iterator in interface it.unimi.dsi.fastutil.ints.IntCollection
      Specified by:
      iterator in interface it.unimi.dsi.fastutil.ints.IntIterable
      Specified by:
      iterator in interface Iterable<Integer>
    • spliterator

      public it.unimi.dsi.fastutil.ints.IntSpliterator spliterator()
      Specified by:
      spliterator in interface Collection<Integer>
      Specified by:
      spliterator in interface it.unimi.dsi.fastutil.ints.IntCollection
      Specified by:
      spliterator in interface it.unimi.dsi.fastutil.ints.IntIterable
      Specified by:
      spliterator in interface Iterable<Integer>
    • stream

      @Deprecated public Stream<Integer> stream()
      Deprecated.
      Specified by:
      stream in interface Collection<Integer>
      Specified by:
      stream in interface it.unimi.dsi.fastutil.ints.IntCollection
    • parallelStream

      @Deprecated public Stream<Integer> parallelStream()
      Deprecated.
      Specified by:
      parallelStream in interface Collection<Integer>
      Specified by:
      parallelStream in interface it.unimi.dsi.fastutil.ints.IntCollection
    • forEach

      public void forEach(IntConsumer arg0)
      Specified by:
      forEach in interface it.unimi.dsi.fastutil.ints.IntIterable
    • addAll

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

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

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

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

      public boolean removeIf(IntPredicate arg0)
      Specified by:
      removeIf in interface it.unimi.dsi.fastutil.ints.IntCollection
    • clear

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

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

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

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