Class DoubleSortedSets.SynchronizedSortedSet

java.lang.Object
it.unimi.dsi.fastutil.doubles.DoubleSets.SynchronizedSet
it.unimi.dsi.fastutil.doubles.DoubleSortedSets.SynchronizedSortedSet
All Implemented Interfaces:
it.unimi.dsi.fastutil.doubles.DoubleBidirectionalIterable, it.unimi.dsi.fastutil.doubles.DoubleCollection, it.unimi.dsi.fastutil.doubles.DoubleIterable, DoubleSet, DoubleSortedSet, Serializable, Iterable<Double>, Collection<Double>, SequencedCollection<Double>, SequencedSet<Double>, Set<Double>, SortedSet<Double>
Enclosing class:
DoubleSortedSets

public static class DoubleSortedSets.SynchronizedSortedSet extends DoubleSets.SynchronizedSet implements DoubleSortedSet, Serializable
A synchronized wrapper class for sorted sets.
See Also:
  • Field Details

    • sortedSet

      protected final DoubleSortedSet sortedSet
    • collection

      protected final it.unimi.dsi.fastutil.doubles.DoubleCollection collection
    • sync

      protected final Object sync
  • Constructor Details

  • Method Details

    • comparator

      public it.unimi.dsi.fastutil.doubles.DoubleComparator comparator()
      Description copied from interface: DoubleSortedSet
      Specified by:
      comparator in interface DoubleSortedSet
      Specified by:
      comparator in interface SortedSet<Double>
    • subSet

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

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

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

      public it.unimi.dsi.fastutil.doubles.DoubleBidirectionalIterator iterator()
      Description copied from interface: DoubleSortedSet
      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<Double>
      Specified by:
      iterator in interface it.unimi.dsi.fastutil.doubles.DoubleBidirectionalIterable
      Specified by:
      iterator in interface it.unimi.dsi.fastutil.doubles.DoubleCollection
      Specified by:
      iterator in interface it.unimi.dsi.fastutil.doubles.DoubleIterable
      Specified by:
      iterator in interface DoubleSet
      Specified by:
      iterator in interface DoubleSortedSet
      Specified by:
      iterator in interface Iterable<Double>
      Specified by:
      iterator in interface Set<Double>
      Returns:
      a bidirectional iterator on the element in this set.
    • iterator

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

      public double firstDouble()
      Description copied from interface: DoubleSortedSet
      Returns the first (lowest) element currently in this set.
      Specified by:
      firstDouble in interface DoubleSortedSet
      See Also:
    • lastDouble

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

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

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

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

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

      @Deprecated public DoubleSortedSet tailSet(Double from)
      Deprecated.
      Please use the corresponding type-specific method instead.
      Specified by:
      tailSet in interface DoubleSortedSet
      Specified by:
      tailSet in interface SortedSet<Double>
    • add

      public boolean add(double arg0)
      Specified by:
      add in interface it.unimi.dsi.fastutil.doubles.DoubleCollection
    • contains

      public boolean contains(double arg0)
      Specified by:
      contains in interface it.unimi.dsi.fastutil.doubles.DoubleCollection
    • size

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

      public boolean isEmpty()
      Specified by:
      isEmpty in interface Collection<Double>
    • toDoubleArray

      public double[] toDoubleArray()
      Specified by:
      toDoubleArray in interface it.unimi.dsi.fastutil.doubles.DoubleCollection
    • toArray

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

      @Deprecated public double[] toDoubleArray(double[] arg0)
      Deprecated.
      Specified by:
      toDoubleArray in interface it.unimi.dsi.fastutil.doubles.DoubleCollection
    • toArray

      public double[] toArray(double[] arg0)
      Specified by:
      toArray in interface it.unimi.dsi.fastutil.doubles.DoubleCollection
    • addAll

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

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

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

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

      @Deprecated public boolean add(Double arg0)
      Deprecated.
      Specified by:
      add in interface Collection<Double>
      Specified by:
      add in interface it.unimi.dsi.fastutil.doubles.DoubleCollection
    • contains

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

      @Deprecated public boolean remove(Object arg0)
      Deprecated.
      Specified by:
      remove in interface Collection<Double>
      Specified by:
      remove in interface it.unimi.dsi.fastutil.doubles.DoubleCollection
    • doubleIterator

      public it.unimi.dsi.fastutil.doubles.DoubleIterator doubleIterator()
      Specified by:
      doubleIterator in interface it.unimi.dsi.fastutil.doubles.DoubleCollection
      Specified by:
      doubleIterator in interface it.unimi.dsi.fastutil.doubles.DoubleIterable
    • doubleSpliterator

      public it.unimi.dsi.fastutil.doubles.DoubleSpliterator doubleSpliterator()
      Specified by:
      doubleSpliterator in interface it.unimi.dsi.fastutil.doubles.DoubleCollection
      Specified by:
      doubleSpliterator in interface it.unimi.dsi.fastutil.doubles.DoubleIterable
    • doubleStream

      public DoubleStream doubleStream()
      Specified by:
      doubleStream in interface it.unimi.dsi.fastutil.doubles.DoubleCollection
    • doubleParallelStream

      public DoubleStream doubleParallelStream()
      Specified by:
      doubleParallelStream in interface it.unimi.dsi.fastutil.doubles.DoubleCollection
    • toArray

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

      public it.unimi.dsi.fastutil.doubles.DoubleSpliterator spliterator()
      Specified by:
      spliterator in interface Collection<Double>
      Specified by:
      spliterator in interface it.unimi.dsi.fastutil.doubles.DoubleCollection
      Specified by:
      spliterator in interface it.unimi.dsi.fastutil.doubles.DoubleIterable
      Specified by:
      spliterator in interface Iterable<Double>
    • stream

      @Deprecated public Stream<Double> stream()
      Deprecated.
      Specified by:
      stream in interface Collection<Double>
      Specified by:
      stream in interface it.unimi.dsi.fastutil.doubles.DoubleCollection
    • parallelStream

      @Deprecated public Stream<Double> parallelStream()
      Deprecated.
      Specified by:
      parallelStream in interface Collection<Double>
      Specified by:
      parallelStream in interface it.unimi.dsi.fastutil.doubles.DoubleCollection
    • forEach

      public void forEach(DoubleConsumer arg0)
      Specified by:
      forEach in interface it.unimi.dsi.fastutil.doubles.DoubleIterable
    • addAll

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

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

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

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

      public boolean removeIf(DoublePredicate arg0)
      Specified by:
      removeIf in interface it.unimi.dsi.fastutil.doubles.DoubleCollection
    • clear

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

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

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

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