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
-
Nested Class Summary
Nested classes/interfaces inherited from class com.landawn.abacus.util.ImmutableSet
ImmutableSet.Builder<E>
-
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 <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.- UnsupportedOperationExceptionstatic <E> ImmutableNavigableSet<E>
wrap
(NavigableSet<? extends E> navigableSet) Deprecated.the ImmutableNavigableSet may be modified through the specifiednavigableSet
static <E> ImmutableSortedSet<E>
Deprecated.throwsUnsupportedOperationException
Methods inherited from class com.landawn.abacus.util.ImmutableSortedSet
comparator, first, headSet, last, subSet, tailSet, wrap
Methods inherited from class com.landawn.abacus.util.ImmutableSet
builder, copyOf, just, of, of, of, of, of, of, of, of, wrap
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
- Type Parameters:
T
-- Parameters:
e1
-- Returns:
-
of
- Type Parameters:
T
-- Parameters:
e1
-e2
-- Returns:
-
of
- Type Parameters:
T
-- Parameters:
e1
-e2
-e3
-- Returns:
-
of
- Type Parameters:
T
-- Parameters:
e1
-e2
-e3
-e4
-- Returns:
-
of
public static <T extends Comparable<? super T>> ImmutableNavigableSet<T> of(T e1, T e2, T e3, T e4, T e5) - Type Parameters:
T
-- Parameters:
e1
-e2
-e3
-e4
-e5
-- Returns:
-
of
public static <T extends Comparable<? super T>> ImmutableNavigableSet<T> of(T e1, T e2, T e3, T e4, T e5, T e6) - Type Parameters:
T
-- Parameters:
e1
-e2
-e3
-e4
-e5
-e6
-- Returns:
-
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) - Type Parameters:
T
-- Parameters:
e1
-e2
-e3
-e4
-e5
-e6
-e7
-- Returns:
-
copyOf
- Type Parameters:
E
-- Parameters:
sortedSet
-- Returns:
-
wrap
@Deprecated public static <E> ImmutableSortedSet<E> wrap(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>
- Returns:
- Throws:
UnsupportedOperationException
-
pollLast
Deprecated.- UnsupportedOperationException- Specified by:
pollLast
in interfaceNavigableSet<E>
- Returns:
- Throws:
UnsupportedOperationException
-
descendingSet
- Specified by:
descendingSet
in interfaceNavigableSet<E>
- Returns:
-
descendingIterator
- Specified by:
descendingIterator
in interfaceNavigableSet<E>
- Returns:
-
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:
-