Package com.landawn.abacus.util
Class ImmutableNavigableSet<E>
java.lang.Object
java.util.AbstractCollection<E>
com.landawn.abacus.util.ImmutableCollection<E>
com.landawn.abacus.util.ImmutableSet<E>
com.landawn.abacus.util.ImmutableSortedSet<E>
com.landawn.abacus.util.ImmutableNavigableSet<E>
- Type Parameters:
E
-
- All Implemented Interfaces:
Immutable
,Iterable<E>
,Collection<E>
,NavigableSet<E>
,Set<E>
,SortedSet<E>
public final class ImmutableNavigableSet<E>
extends ImmutableSortedSet<E>
implements NavigableSet<E>
- Since:
- 1.1.4
- Author:
- Haiyang Li
-
Method Summary
Modifier and TypeMethodDescriptionstatic <E> ImmutableNavigableSet<E>
static <E> ImmutableNavigableSet<E>
empty()
static <T extends Comparable<? super T>>
ImmutableNavigableSet<T>just
(T e) static <E> ImmutableNavigableSet<E>
of
(NavigableSet<? extends E> navigableSet) Deprecated.static <E> ImmutableSortedSet<E>
Deprecated.throwsUnsupportedOperationException
static <T extends Comparable<? super T>>
ImmutableNavigableSet<T>of
(T e1) static <T extends Comparable<? super T>>
ImmutableNavigableSet<T>of
(T e1, T e2) static <T extends Comparable<? super T>>
ImmutableNavigableSet<T>of
(T e1, T e2, T e3) static <T extends Comparable<? super T>>
ImmutableNavigableSet<T>of
(T e1, T e2, T e3, T e4) static <T extends Comparable<? super T>>
ImmutableNavigableSet<T>of
(T e1, T e2, T e3, T e4, T e5) static <T extends Comparable<? super T>>
ImmutableNavigableSet<T>of
(T e1, T e2, T e3, T e4, T e5, T e6) static <T extends Comparable<? super T>>
ImmutableNavigableSet<T>of
(T e1, T e2, T e3, T e4, T e5, T e6, T e7) Deprecated.- UnsupportedOperationExceptionpollLast()
Deprecated.- UnsupportedOperationExceptionMethods inherited from class com.landawn.abacus.util.ImmutableSortedSet
comparator, copyOf, first, headSet, last, of, subSet, tailSet
Methods inherited from class com.landawn.abacus.util.ImmutableSet
just, of, of, of, of, of, of, of, of
Methods inherited from class com.landawn.abacus.util.ImmutableCollection
add, addAll, clear, contains, equals, hashCode, iterator, remove, removeAll, removeIf, retainAll, size, toArray, toArray, toString
Methods inherited from class java.util.AbstractCollection
containsAll, isEmpty
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.NavigableSet
headSet, iterator, subSet, tailSet
Methods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, size, toArray, toArray
Methods inherited from interface java.util.SortedSet
comparator, first, last, spliterator
-
Method Details
-
empty
- Type Parameters:
E
-- Returns:
-
just
- Type Parameters:
T
-- Parameters:
e
-- Returns:
-
of
-
of
-
of
-
of
-
of
public static <T extends Comparable<? super T>> ImmutableNavigableSet<T> of(T e1, T e2, T e3, T e4, T e5) -
of
public static <T extends Comparable<? super T>> ImmutableNavigableSet<T> of(T e1, T e2, T e3, T e4, T e5, T e6) -
of
public static <T extends Comparable<? super T>> ImmutableNavigableSet<T> of(T e1, T e2, T e3, T e4, T e5, T e6, T e7) -
copyOf
- Type Parameters:
E
-- Parameters:
sortedSet
-- Returns:
-
of
@Deprecated public static <E> ImmutableSortedSet<E> of(SortedSet<? extends E> sortedSet) throws UnsupportedOperationException Deprecated.throwsUnsupportedOperationException
- Type Parameters:
E
-- Parameters:
sortedSet
-- Returns:
- Throws:
UnsupportedOperationException
-
lower
- Specified by:
lower
in interfaceNavigableSet<E>
- Parameters:
e
-- Returns:
-
floor
- Specified by:
floor
in interfaceNavigableSet<E>
- Parameters:
e
-- Returns:
-
ceiling
- Specified by:
ceiling
in interfaceNavigableSet<E>
- Parameters:
e
-- Returns:
-
higher
- Specified by:
higher
in interfaceNavigableSet<E>
- Parameters:
e
-- Returns:
-
pollFirst
Deprecated.- UnsupportedOperationException- Specified by:
pollFirst
in interfaceNavigableSet<E>
- Throws:
UnsupportedOperationException
-
pollLast
Deprecated.- UnsupportedOperationException- Specified by:
pollLast
in interfaceNavigableSet<E>
- Throws:
UnsupportedOperationException
-
descendingSet
- Specified by:
descendingSet
in interfaceNavigableSet<E>
-
descendingIterator
- Specified by:
descendingIterator
in interfaceNavigableSet<E>
-
subSet
public ImmutableNavigableSet<E> subSet(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive) - Specified by:
subSet
in interfaceNavigableSet<E>
- Parameters:
fromElement
-fromInclusive
-toElement
-toInclusive
-- Returns:
-
headSet
- Specified by:
headSet
in interfaceNavigableSet<E>
- Parameters:
toElement
-inclusive
-- Returns:
-
tailSet
- Specified by:
tailSet
in interfaceNavigableSet<E>
- Parameters:
fromElement
-inclusive
-- Returns:
-
navigableSet