Class CharSortedSets.SynchronizedSortedSet

java.lang.Object
it.unimi.dsi.fastutil.chars.CharSets.SynchronizedSet
it.unimi.dsi.fastutil.chars.CharSortedSets.SynchronizedSortedSet
All Implemented Interfaces:
it.unimi.dsi.fastutil.chars.CharBidirectionalIterable, it.unimi.dsi.fastutil.chars.CharCollection, it.unimi.dsi.fastutil.chars.CharIterable, CharSet, CharSortedSet, Serializable, Iterable<Character>, Collection<Character>, SequencedCollection<Character>, SequencedSet<Character>, Set<Character>, SortedSet<Character>
Enclosing class:
CharSortedSets

public static class CharSortedSets.SynchronizedSortedSet extends CharSets.SynchronizedSet implements CharSortedSet, Serializable
A synchronized wrapper class for sorted sets.
See Also:
  • Field Details

    • sortedSet

      protected final CharSortedSet sortedSet
    • collection

      protected final it.unimi.dsi.fastutil.chars.CharCollection collection
    • sync

      protected final Object sync
  • Constructor Details

    • SynchronizedSortedSet

      protected SynchronizedSortedSet(CharSortedSet s, Object sync)
    • SynchronizedSortedSet

      protected SynchronizedSortedSet(CharSortedSet s)
  • Method Details

    • comparator

      public it.unimi.dsi.fastutil.chars.CharComparator comparator()
      Description copied from interface: CharSortedSet
      Specified by:
      comparator in interface CharSortedSet
      Specified by:
      comparator in interface SortedSet<Character>
    • subSet

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

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

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

      public it.unimi.dsi.fastutil.chars.CharBidirectionalIterator iterator()
      Description copied from interface: CharSortedSet
      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.chars.CharBidirectionalIterable
      Specified by:
      iterator in interface it.unimi.dsi.fastutil.chars.CharCollection
      Specified by:
      iterator in interface it.unimi.dsi.fastutil.chars.CharIterable
      Specified by:
      iterator in interface CharSet
      Specified by:
      iterator in interface CharSortedSet
      Specified by:
      iterator in interface Collection<Character>
      Specified by:
      iterator in interface Iterable<Character>
      Specified by:
      iterator in interface Set<Character>
      Returns:
      a bidirectional iterator on the element in this set.
    • iterator

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

      public char firstChar()
      Description copied from interface: CharSortedSet
      Returns the first (lowest) element currently in this set.
      Specified by:
      firstChar in interface CharSortedSet
      See Also:
    • lastChar

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

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

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

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

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

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

      public boolean add(char arg0)
      Specified by:
      add in interface it.unimi.dsi.fastutil.chars.CharCollection
    • contains

      public boolean contains(char arg0)
      Specified by:
      contains in interface it.unimi.dsi.fastutil.chars.CharCollection
    • size

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

      public boolean isEmpty()
      Specified by:
      isEmpty in interface Collection<Character>
    • toCharArray

      public char[] toCharArray()
      Specified by:
      toCharArray in interface it.unimi.dsi.fastutil.chars.CharCollection
    • toArray

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

      @Deprecated public char[] toCharArray(char[] arg0)
      Deprecated.
      Specified by:
      toCharArray in interface it.unimi.dsi.fastutil.chars.CharCollection
    • toArray

      public char[] toArray(char[] arg0)
      Specified by:
      toArray in interface it.unimi.dsi.fastutil.chars.CharCollection
    • addAll

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

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

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

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

      @Deprecated public boolean add(Character arg0)
      Deprecated.
      Specified by:
      add in interface it.unimi.dsi.fastutil.chars.CharCollection
      Specified by:
      add in interface Collection<Character>
    • contains

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

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

      public it.unimi.dsi.fastutil.ints.IntIterator intIterator()
      Specified by:
      intIterator in interface it.unimi.dsi.fastutil.chars.CharCollection
      Specified by:
      intIterator in interface it.unimi.dsi.fastutil.chars.CharIterable
    • intSpliterator

      public it.unimi.dsi.fastutil.ints.IntSpliterator intSpliterator()
      Specified by:
      intSpliterator in interface it.unimi.dsi.fastutil.chars.CharCollection
      Specified by:
      intSpliterator in interface it.unimi.dsi.fastutil.chars.CharIterable
    • intStream

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

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

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

      public it.unimi.dsi.fastutil.chars.CharSpliterator spliterator()
      Specified by:
      spliterator in interface it.unimi.dsi.fastutil.chars.CharCollection
      Specified by:
      spliterator in interface it.unimi.dsi.fastutil.chars.CharIterable
      Specified by:
      spliterator in interface Collection<Character>
      Specified by:
      spliterator in interface Iterable<Character>
    • stream

      @Deprecated public Stream<Character> stream()
      Deprecated.
      Specified by:
      stream in interface it.unimi.dsi.fastutil.chars.CharCollection
      Specified by:
      stream in interface Collection<Character>
    • parallelStream

      @Deprecated public Stream<Character> parallelStream()
      Deprecated.
      Specified by:
      parallelStream in interface it.unimi.dsi.fastutil.chars.CharCollection
      Specified by:
      parallelStream in interface Collection<Character>
    • forEach

      public void forEach(it.unimi.dsi.fastutil.chars.CharConsumer arg0)
      Specified by:
      forEach in interface it.unimi.dsi.fastutil.chars.CharIterable
    • addAll

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

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

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

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

      public boolean removeIf(it.unimi.dsi.fastutil.chars.CharPredicate arg0)
      Specified by:
      removeIf in interface it.unimi.dsi.fastutil.chars.CharCollection
    • clear

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

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

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

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