Class ByteSets.SynchronizedSet

java.lang.Object
it.unimi.dsi.fastutil.bytes.ByteSets.SynchronizedSet
All Implemented Interfaces:
it.unimi.dsi.fastutil.bytes.ByteCollection, it.unimi.dsi.fastutil.bytes.ByteIterable, ByteSet, Serializable, Iterable<Byte>, Collection<Byte>, Set<Byte>
Direct Known Subclasses:
ByteSortedSets.SynchronizedSortedSet
Enclosing class:
ByteSets

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

    • collection

      protected final it.unimi.dsi.fastutil.bytes.ByteCollection collection
    • sync

      protected final Object sync
  • Constructor Details

    • SynchronizedSet

      protected SynchronizedSet(ByteSet s, Object sync)
    • SynchronizedSet

      protected SynchronizedSet(ByteSet s)
  • Method Details

    • remove

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

      @Deprecated public boolean rem(byte k)
      Deprecated.
      Description copied from interface: ByteSet
      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.bytes.ByteCollection
      Specified by:
      rem in interface ByteSet
    • add

      public boolean add(byte arg0)
      Specified by:
      add in interface it.unimi.dsi.fastutil.bytes.ByteCollection
    • contains

      public boolean contains(byte arg0)
      Specified by:
      contains in interface it.unimi.dsi.fastutil.bytes.ByteCollection
    • size

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

      public boolean isEmpty()
      Specified by:
      isEmpty in interface Collection<Byte>
    • toByteArray

      public byte[] toByteArray()
      Specified by:
      toByteArray in interface it.unimi.dsi.fastutil.bytes.ByteCollection
    • toArray

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

      @Deprecated public byte[] toByteArray(byte[] arg0)
      Deprecated.
      Specified by:
      toByteArray in interface it.unimi.dsi.fastutil.bytes.ByteCollection
    • toArray

      public byte[] toArray(byte[] arg0)
      Specified by:
      toArray in interface it.unimi.dsi.fastutil.bytes.ByteCollection
    • addAll

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

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

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

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

      @Deprecated public boolean add(Byte arg0)
      Deprecated.
      Specified by:
      add in interface it.unimi.dsi.fastutil.bytes.ByteCollection
      Specified by:
      add in interface Collection<Byte>
    • contains

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

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

      public it.unimi.dsi.fastutil.ints.IntIterator intIterator()
      Specified by:
      intIterator in interface it.unimi.dsi.fastutil.bytes.ByteCollection
      Specified by:
      intIterator in interface it.unimi.dsi.fastutil.bytes.ByteIterable
    • intSpliterator

      public it.unimi.dsi.fastutil.ints.IntSpliterator intSpliterator()
      Specified by:
      intSpliterator in interface it.unimi.dsi.fastutil.bytes.ByteCollection
      Specified by:
      intSpliterator in interface it.unimi.dsi.fastutil.bytes.ByteIterable
    • intStream

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

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

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

      public it.unimi.dsi.fastutil.bytes.ByteIterator iterator()
      Specified by:
      iterator in interface it.unimi.dsi.fastutil.bytes.ByteCollection
      Specified by:
      iterator in interface it.unimi.dsi.fastutil.bytes.ByteIterable
      Specified by:
      iterator in interface Collection<Byte>
      Specified by:
      iterator in interface Iterable<Byte>
    • spliterator

      public it.unimi.dsi.fastutil.bytes.ByteSpliterator spliterator()
      Specified by:
      spliterator in interface it.unimi.dsi.fastutil.bytes.ByteCollection
      Specified by:
      spliterator in interface it.unimi.dsi.fastutil.bytes.ByteIterable
      Specified by:
      spliterator in interface Collection<Byte>
      Specified by:
      spliterator in interface Iterable<Byte>
    • stream

      @Deprecated public Stream<Byte> stream()
      Deprecated.
      Specified by:
      stream in interface it.unimi.dsi.fastutil.bytes.ByteCollection
      Specified by:
      stream in interface Collection<Byte>
    • parallelStream

      @Deprecated public Stream<Byte> parallelStream()
      Deprecated.
      Specified by:
      parallelStream in interface it.unimi.dsi.fastutil.bytes.ByteCollection
      Specified by:
      parallelStream in interface Collection<Byte>
    • forEach

      public void forEach(it.unimi.dsi.fastutil.bytes.ByteConsumer arg0)
      Specified by:
      forEach in interface it.unimi.dsi.fastutil.bytes.ByteIterable
    • addAll

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

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

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

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

      public boolean removeIf(it.unimi.dsi.fastutil.bytes.BytePredicate arg0)
      Specified by:
      removeIf in interface it.unimi.dsi.fastutil.bytes.ByteCollection
    • clear

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

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

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

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