Class ByteSortedSets.SynchronizedSortedSet

java.lang.Object
it.unimi.dsi.fastutil.bytes.ByteSets.SynchronizedSet
it.unimi.dsi.fastutil.bytes.ByteSortedSets.SynchronizedSortedSet
All Implemented Interfaces:
it.unimi.dsi.fastutil.bytes.ByteBidirectionalIterable, it.unimi.dsi.fastutil.bytes.ByteCollection, it.unimi.dsi.fastutil.bytes.ByteIterable, ByteSet, ByteSortedSet, Serializable, Iterable<Byte>, Collection<Byte>, SequencedCollection<Byte>, SequencedSet<Byte>, Set<Byte>, SortedSet<Byte>
Enclosing class:
ByteSortedSets

public static class ByteSortedSets.SynchronizedSortedSet extends ByteSets.SynchronizedSet implements ByteSortedSet, Serializable
A synchronized wrapper class for sorted sets.
See Also:
  • Field Details

    • sortedSet

      protected final ByteSortedSet sortedSet
    • collection

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

      protected final Object sync
  • Constructor Details

    • SynchronizedSortedSet

      protected SynchronizedSortedSet(ByteSortedSet s, Object sync)
    • SynchronizedSortedSet

      protected SynchronizedSortedSet(ByteSortedSet s)
  • Method Details

    • comparator

      public it.unimi.dsi.fastutil.bytes.ByteComparator comparator()
      Description copied from interface: ByteSortedSet
      Specified by:
      comparator in interface ByteSortedSet
      Specified by:
      comparator in interface SortedSet<Byte>
    • subSet

      public ByteSortedSet subSet(byte from, byte to)
      Description copied from interface: ByteSortedSet
      Returns a view of the portion of this sorted set whose elements range from fromElement, inclusive, to toElement, exclusive.
      Specified by:
      subSet in interface ByteSortedSet
      See Also:
    • headSet

      public ByteSortedSet headSet(byte to)
      Description copied from interface: ByteSortedSet
      Returns a view of the portion of this sorted set whose elements are strictly less than toElement.
      Specified by:
      headSet in interface ByteSortedSet
      See Also:
    • tailSet

      public ByteSortedSet tailSet(byte from)
      Description copied from interface: ByteSortedSet
      Returns a view of the portion of this sorted set whose elements are greater than or equal to fromElement.
      Specified by:
      tailSet in interface ByteSortedSet
      See Also:
    • iterator

      public it.unimi.dsi.fastutil.bytes.ByteBidirectionalIterator iterator()
      Description copied from interface: ByteSortedSet
      Returns a type-specific BidirectionalIterator on the elements in this set.

      This method returns a parameterised bidirectional iterator. The iterator can be moreover safely cast to a type-specific iterator.

      Specified by:
      iterator in interface it.unimi.dsi.fastutil.bytes.ByteBidirectionalIterable
      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 ByteSet
      Specified by:
      iterator in interface ByteSortedSet
      Specified by:
      iterator in interface Collection<Byte>
      Specified by:
      iterator in interface Iterable<Byte>
      Specified by:
      iterator in interface Set<Byte>
      Returns:
      a bidirectional iterator on the element in this set.
    • iterator

      public it.unimi.dsi.fastutil.bytes.ByteBidirectionalIterator iterator(byte from)
      Description copied from interface: ByteSortedSet
      Returns a type-specific BidirectionalIterator on the elements in this set, starting from a given element of the domain (optional operation).

      This method returns a type-specific bidirectional iterator with given starting point. The starting point is any element comparable to the elements of this set (even if it does not actually belong to the set). The next element of the returned iterator is the least element of the set that is greater than the starting point (if there are no elements greater than the starting point, hasNext() will return false). The previous element of the returned iterator is the greatest element of the set that is smaller than or equal to the starting point (if there are no elements smaller than or equal to the starting point, hasPrevious() will return false).

      Note that passing the last element of the set as starting point and calling previous() you can traverse the entire set in reverse order.

      Specified by:
      iterator in interface ByteSortedSet
      Parameters:
      from - an element to start from.
      Returns:
      a bidirectional iterator on the element in this set, starting at the given element.
    • firstByte

      public byte firstByte()
      Description copied from interface: ByteSortedSet
      Returns the first (lowest) element currently in this set.
      Specified by:
      firstByte in interface ByteSortedSet
      See Also:
    • lastByte

      public byte lastByte()
      Description copied from interface: ByteSortedSet
      Returns the last (highest) element currently in this set.
      Specified by:
      lastByte in interface ByteSortedSet
      See Also:
    • first

      @Deprecated public Byte first()
      Deprecated.
      Please use the corresponding type-specific method instead.
      Specified by:
      first in interface ByteSortedSet
      Specified by:
      first in interface SortedSet<Byte>
    • last

      @Deprecated public Byte last()
      Deprecated.
      Please use the corresponding type-specific method instead.
      Specified by:
      last in interface ByteSortedSet
      Specified by:
      last in interface SortedSet<Byte>
    • subSet

      @Deprecated public ByteSortedSet subSet(Byte from, Byte to)
      Deprecated.
      Please use the corresponding type-specific method instead.
      Specified by:
      subSet in interface ByteSortedSet
      Specified by:
      subSet in interface SortedSet<Byte>
    • headSet

      @Deprecated public ByteSortedSet headSet(Byte to)
      Deprecated.
      Please use the corresponding type-specific method instead.
      Specified by:
      headSet in interface ByteSortedSet
      Specified by:
      headSet in interface SortedSet<Byte>
    • tailSet

      @Deprecated public ByteSortedSet tailSet(Byte from)
      Deprecated.
      Please use the corresponding type-specific method instead.
      Specified by:
      tailSet in interface ByteSortedSet
      Specified by:
      tailSet in interface SortedSet<Byte>
    • 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>
    • 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