Class IntSortedSets.UnmodifiableSortedSet

java.lang.Object
it.unimi.dsi.fastutil.ints.IntSets.UnmodifiableSet
it.unimi.dsi.fastutil.ints.IntSortedSets.UnmodifiableSortedSet
All Implemented Interfaces:
it.unimi.dsi.fastutil.ints.IntBidirectionalIterable, it.unimi.dsi.fastutil.ints.IntCollection, it.unimi.dsi.fastutil.ints.IntIterable, IntSet, IntSortedSet, Serializable, Iterable<Integer>, Collection<Integer>, SequencedCollection<Integer>, SequencedSet<Integer>, Set<Integer>, SortedSet<Integer>
Enclosing class:
IntSortedSets

public static class IntSortedSets.UnmodifiableSortedSet extends IntSets.UnmodifiableSet implements IntSortedSet, Serializable
An unmodifiable wrapper class for sorted sets.
See Also:
  • Field Details

    • sortedSet

      protected final IntSortedSet sortedSet
    • collection

      protected final it.unimi.dsi.fastutil.ints.IntCollection collection
  • Constructor Details

    • UnmodifiableSortedSet

      protected UnmodifiableSortedSet(IntSortedSet s)
  • Method Details

    • comparator

      public it.unimi.dsi.fastutil.ints.IntComparator comparator()
      Description copied from interface: IntSortedSet
      Specified by:
      comparator in interface IntSortedSet
      Specified by:
      comparator in interface SortedSet<Integer>
    • subSet

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

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

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

      public it.unimi.dsi.fastutil.ints.IntBidirectionalIterator iterator()
      Description copied from interface: IntSortedSet
      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<Integer>
      Specified by:
      iterator in interface it.unimi.dsi.fastutil.ints.IntBidirectionalIterable
      Specified by:
      iterator in interface it.unimi.dsi.fastutil.ints.IntCollection
      Specified by:
      iterator in interface it.unimi.dsi.fastutil.ints.IntIterable
      Specified by:
      iterator in interface IntSet
      Specified by:
      iterator in interface IntSortedSet
      Specified by:
      iterator in interface Iterable<Integer>
      Specified by:
      iterator in interface Set<Integer>
      Returns:
      a bidirectional iterator on the element in this set.
    • iterator

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

      public int firstInt()
      Description copied from interface: IntSortedSet
      Returns the first (lowest) element currently in this set.
      Specified by:
      firstInt in interface IntSortedSet
      See Also:
    • lastInt

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

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

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

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

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

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

      public boolean add(int arg0)
      Specified by:
      add in interface it.unimi.dsi.fastutil.ints.IntCollection
    • size

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

      public boolean isEmpty()
      Specified by:
      isEmpty in interface Collection<Integer>
    • contains

      public boolean contains(int arg0)
      Specified by:
      contains in interface it.unimi.dsi.fastutil.ints.IntCollection
    • spliterator

      public it.unimi.dsi.fastutil.ints.IntSpliterator spliterator()
      Specified by:
      spliterator in interface Collection<Integer>
      Specified by:
      spliterator in interface it.unimi.dsi.fastutil.ints.IntCollection
      Specified by:
      spliterator in interface it.unimi.dsi.fastutil.ints.IntIterable
      Specified by:
      spliterator in interface Iterable<Integer>
    • stream

      @Deprecated public Stream<Integer> stream()
      Deprecated.
      Specified by:
      stream in interface Collection<Integer>
      Specified by:
      stream in interface it.unimi.dsi.fastutil.ints.IntCollection
    • parallelStream

      @Deprecated public Stream<Integer> parallelStream()
      Deprecated.
      Specified by:
      parallelStream in interface Collection<Integer>
      Specified by:
      parallelStream in interface it.unimi.dsi.fastutil.ints.IntCollection
    • clear

      public void clear()
      Specified by:
      clear in interface Collection<Integer>
    • toArray

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

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

      public void forEach(IntConsumer arg0)
      Specified by:
      forEach in interface it.unimi.dsi.fastutil.ints.IntIterable
    • containsAll

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

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

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

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

      public boolean removeIf(IntPredicate arg0)
      Specified by:
      removeIf in interface it.unimi.dsi.fastutil.ints.IntCollection
    • add

      @Deprecated public boolean add(Integer arg0)
      Deprecated.
      Specified by:
      add in interface Collection<Integer>
      Specified by:
      add in interface it.unimi.dsi.fastutil.ints.IntCollection
    • contains

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

      @Deprecated public boolean remove(Object arg0)
      Deprecated.
      Specified by:
      remove in interface Collection<Integer>
      Specified by:
      remove in interface it.unimi.dsi.fastutil.ints.IntCollection
    • toIntArray

      public int[] toIntArray()
      Specified by:
      toIntArray in interface it.unimi.dsi.fastutil.ints.IntCollection
    • toIntArray

      @Deprecated public int[] toIntArray(int[] arg0)
      Deprecated.
      Specified by:
      toIntArray in interface it.unimi.dsi.fastutil.ints.IntCollection
    • toArray

      public int[] toArray(int[] arg0)
      Specified by:
      toArray in interface it.unimi.dsi.fastutil.ints.IntCollection
    • containsAll

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

      public boolean addAll(it.unimi.dsi.fastutil.ints.IntCollection arg0)
      Specified by:
      addAll in interface it.unimi.dsi.fastutil.ints.IntCollection
    • removeAll

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

      public boolean retainAll(it.unimi.dsi.fastutil.ints.IntCollection arg0)
      Specified by:
      retainAll in interface it.unimi.dsi.fastutil.ints.IntCollection
    • intIterator

      public it.unimi.dsi.fastutil.ints.IntIterator intIterator()
      Specified by:
      intIterator in interface it.unimi.dsi.fastutil.ints.IntCollection
      Specified by:
      intIterator in interface it.unimi.dsi.fastutil.ints.IntIterable
    • intSpliterator

      public it.unimi.dsi.fastutil.ints.IntSpliterator intSpliterator()
      Specified by:
      intSpliterator in interface it.unimi.dsi.fastutil.ints.IntCollection
      Specified by:
      intSpliterator in interface it.unimi.dsi.fastutil.ints.IntIterable
    • intStream

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

      public IntStream intParallelStream()
      Specified by:
      intParallelStream in interface it.unimi.dsi.fastutil.ints.IntCollection
    • toString

      public String toString()
      Overrides:
      toString in class Object