Class ShortSortedSets.SynchronizedSortedSet

java.lang.Object
it.unimi.dsi.fastutil.shorts.ShortSets.SynchronizedSet
it.unimi.dsi.fastutil.shorts.ShortSortedSets.SynchronizedSortedSet
All Implemented Interfaces:
it.unimi.dsi.fastutil.shorts.ShortBidirectionalIterable, it.unimi.dsi.fastutil.shorts.ShortCollection, it.unimi.dsi.fastutil.shorts.ShortIterable, ShortSet, ShortSortedSet, Serializable, Iterable<Short>, Collection<Short>, SequencedCollection<Short>, SequencedSet<Short>, Set<Short>, SortedSet<Short>
Enclosing class:
ShortSortedSets

public static class ShortSortedSets.SynchronizedSortedSet extends ShortSets.SynchronizedSet implements ShortSortedSet, Serializable
A synchronized wrapper class for sorted sets.
See Also:
  • Field Details

    • sortedSet

      protected final ShortSortedSet sortedSet
    • collection

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

      protected final Object sync
  • Constructor Details

  • Method Details

    • comparator

      public it.unimi.dsi.fastutil.shorts.ShortComparator comparator()
      Description copied from interface: ShortSortedSet
      Specified by:
      comparator in interface ShortSortedSet
      Specified by:
      comparator in interface SortedSet<Short>
    • subSet

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

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

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

      public it.unimi.dsi.fastutil.shorts.ShortBidirectionalIterator iterator()
      Description copied from interface: ShortSortedSet
      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 Collection<Short>
      Specified by:
      iterator in interface Iterable<Short>
      Specified by:
      iterator in interface Set<Short>
      Specified by:
      iterator in interface it.unimi.dsi.fastutil.shorts.ShortBidirectionalIterable
      Specified by:
      iterator in interface it.unimi.dsi.fastutil.shorts.ShortCollection
      Specified by:
      iterator in interface it.unimi.dsi.fastutil.shorts.ShortIterable
      Specified by:
      iterator in interface ShortSet
      Specified by:
      iterator in interface ShortSortedSet
      Returns:
      a bidirectional iterator on the element in this set.
    • iterator

      public it.unimi.dsi.fastutil.shorts.ShortBidirectionalIterator iterator(short from)
      Description copied from interface: ShortSortedSet
      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 ShortSortedSet
      Parameters:
      from - an element to start from.
      Returns:
      a bidirectional iterator on the element in this set, starting at the given element.
    • firstShort

      public short firstShort()
      Description copied from interface: ShortSortedSet
      Returns the first (lowest) element currently in this set.
      Specified by:
      firstShort in interface ShortSortedSet
      See Also:
    • lastShort

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

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

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

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

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

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