Class ShortSets.SynchronizedSet

java.lang.Object
it.unimi.dsi.fastutil.shorts.ShortSets.SynchronizedSet
All Implemented Interfaces:
it.unimi.dsi.fastutil.shorts.ShortCollection, it.unimi.dsi.fastutil.shorts.ShortIterable, ShortSet, Serializable, Iterable<Short>, Collection<Short>, Set<Short>
Direct Known Subclasses:
ShortSortedSets.SynchronizedSortedSet
Enclosing class:
ShortSets

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

    • collection

      protected final it.unimi.dsi.fastutil.shorts.ShortCollection collection
    • sync

      protected final Object sync
  • Constructor Details

    • SynchronizedSet

      protected SynchronizedSet(ShortSet s, Object sync)
    • SynchronizedSet

      protected SynchronizedSet(ShortSet s)
  • Method Details

    • remove

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

      @Deprecated public boolean rem(short k)
      Deprecated.
      Description copied from interface: ShortSet
      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.shorts.ShortCollection
      Specified by:
      rem in interface ShortSet
    • add

      public boolean add(short arg0)
      Specified by:
      add in interface it.unimi.dsi.fastutil.shorts.ShortCollection
    • contains

      public boolean contains(short arg0)
      Specified by:
      contains in interface it.unimi.dsi.fastutil.shorts.ShortCollection
    • size

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

      public boolean isEmpty()
      Specified by:
      isEmpty in interface Collection<Short>
    • toShortArray

      public short[] toShortArray()
      Specified by:
      toShortArray in interface it.unimi.dsi.fastutil.shorts.ShortCollection
    • toArray

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

      @Deprecated public short[] toShortArray(short[] arg0)
      Deprecated.
      Specified by:
      toShortArray in interface it.unimi.dsi.fastutil.shorts.ShortCollection
    • toArray

      public short[] toArray(short[] arg0)
      Specified by:
      toArray in interface it.unimi.dsi.fastutil.shorts.ShortCollection
    • addAll

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

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

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

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

      @Deprecated public boolean add(Short arg0)
      Deprecated.
      Specified by:
      add in interface Collection<Short>
      Specified by:
      add in interface it.unimi.dsi.fastutil.shorts.ShortCollection
    • contains

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

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

      public it.unimi.dsi.fastutil.ints.IntIterator intIterator()
      Specified by:
      intIterator in interface it.unimi.dsi.fastutil.shorts.ShortCollection
      Specified by:
      intIterator in interface it.unimi.dsi.fastutil.shorts.ShortIterable
    • intSpliterator

      public it.unimi.dsi.fastutil.ints.IntSpliterator intSpliterator()
      Specified by:
      intSpliterator in interface it.unimi.dsi.fastutil.shorts.ShortCollection
      Specified by:
      intSpliterator in interface it.unimi.dsi.fastutil.shorts.ShortIterable
    • intStream

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

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

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

      public it.unimi.dsi.fastutil.shorts.ShortIterator iterator()
      Specified by:
      iterator in interface Collection<Short>
      Specified by:
      iterator in interface Iterable<Short>
      Specified by:
      iterator in interface it.unimi.dsi.fastutil.shorts.ShortCollection
      Specified by:
      iterator in interface it.unimi.dsi.fastutil.shorts.ShortIterable
    • spliterator

      public it.unimi.dsi.fastutil.shorts.ShortSpliterator spliterator()
      Specified by:
      spliterator in interface Collection<Short>
      Specified by:
      spliterator in interface Iterable<Short>
      Specified by:
      spliterator in interface it.unimi.dsi.fastutil.shorts.ShortCollection
      Specified by:
      spliterator in interface it.unimi.dsi.fastutil.shorts.ShortIterable
    • stream

      @Deprecated public Stream<Short> stream()
      Deprecated.
      Specified by:
      stream in interface Collection<Short>
      Specified by:
      stream in interface it.unimi.dsi.fastutil.shorts.ShortCollection
    • parallelStream

      @Deprecated public Stream<Short> parallelStream()
      Deprecated.
      Specified by:
      parallelStream in interface Collection<Short>
      Specified by:
      parallelStream in interface it.unimi.dsi.fastutil.shorts.ShortCollection
    • forEach

      public void forEach(it.unimi.dsi.fastutil.shorts.ShortConsumer arg0)
      Specified by:
      forEach in interface it.unimi.dsi.fastutil.shorts.ShortIterable
    • addAll

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

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

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

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

      public boolean removeIf(it.unimi.dsi.fastutil.shorts.ShortPredicate arg0)
      Specified by:
      removeIf in interface it.unimi.dsi.fastutil.shorts.ShortCollection
    • clear

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

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

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

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