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>
,SequencedCollection<E>
,SequencedSet<E>
,Set<E>
,SortedSet<E>
public final class ImmutableNavigableSet<E>
extends ImmutableSortedSet<E>
implements NavigableSet<E>
-
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> copyOf
(Collection<? extends E> c) Returns an ImmutableNavigableSet containing the elements of the specified collection.static <E> ImmutableNavigableSet
<E> empty()
static <E extends Comparable<? super E>>
ImmutableNavigableSet<E> just
(E e) static <E extends Comparable<? super E>>
ImmutableNavigableSet<E> of
(E e1) static <E extends Comparable<? super E>>
ImmutableNavigableSet<E> of
(E e1, E e2) static <E extends Comparable<? super E>>
ImmutableNavigableSet<E> of
(E e1, E e2, E e3) static <E extends Comparable<? super E>>
ImmutableNavigableSet<E> of
(E e1, E e2, E e3, E e4) static <E extends Comparable<? super E>>
ImmutableNavigableSet<E> of
(E e1, E e2, E e3, E e4, E e5) static <E extends Comparable<? super E>>
ImmutableNavigableSet<E> of
(E e1, E e2, E e3, E e4, E e5, E e6) static <E extends Comparable<? super E>>
ImmutableNavigableSet<E> of
(E e1, E e2, E e3, E e4, E e5, E e6, E e7) static <E extends Comparable<? super E>>
ImmutableNavigableSet<E> of
(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8) static <E extends Comparable<? super E>>
ImmutableNavigableSet<E> of
(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8, E e9) static <E extends Comparable<? super E>>
ImmutableNavigableSet<E> of
(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8, E e9, E e10) Deprecated.- UnsupportedOperationExceptionpollLast()
Deprecated.- UnsupportedOperationExceptionstatic <E> ImmutableNavigableSet
<E> wrap
(NavigableSet<? extends E> navigableSet) Wraps the provided NavigableSet into an ImmutableNavigableSet.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, builder, just, of, of, of, 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, removeFirst, removeLast, reversed, 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
addFirst, addLast, comparator, first, getFirst, getLast, last, spliterator
-
Method Details
-
empty
- Type Parameters:
E
-- Returns:
-
just
- Type Parameters:
E
-- Parameters:
e
-- Returns:
-
of
- Type Parameters:
E
-- Parameters:
e1
-- Returns:
-
of
- Type Parameters:
E
-- Parameters:
e1
-e2
-- Returns:
-
of
- Type Parameters:
E
-- Parameters:
e1
-e2
-e3
-- Returns:
-
of
- Type Parameters:
E
-- Parameters:
e1
-e2
-e3
-e4
-- Returns:
-
of
public static <E extends Comparable<? super E>> ImmutableNavigableSet<E> of(E e1, E e2, E e3, E e4, E e5) - Type Parameters:
E
-- Parameters:
e1
-e2
-e3
-e4
-e5
-- Returns:
-
of
public static <E extends Comparable<? super E>> ImmutableNavigableSet<E> of(E e1, E e2, E e3, E e4, E e5, E e6) - Type Parameters:
E
-- Parameters:
e1
-e2
-e3
-e4
-e5
-e6
-- Returns:
-
of
public static <E extends Comparable<? super E>> ImmutableNavigableSet<E> of(E e1, E e2, E e3, E e4, E e5, E e6, E e7) - Type Parameters:
E
-- Parameters:
e1
-e2
-e3
-e4
-e5
-e6
-e7
-- Returns:
-
of
public static <E extends Comparable<? super E>> ImmutableNavigableSet<E> of(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8) - Type Parameters:
E
-- Parameters:
e1
-e2
-e3
-e4
-e5
-e6
-e7
-e8
-- Returns:
-
of
public static <E extends Comparable<? super E>> ImmutableNavigableSet<E> of(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8, E e9) - Type Parameters:
E
-- Parameters:
e1
-e2
-e3
-e4
-e5
-e6
-e7
-e8
-e9
-- Returns:
-
of
public static <E extends Comparable<? super E>> ImmutableNavigableSet<E> of(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8, E e9, E e10) - Type Parameters:
E
-- Parameters:
e1
-e2
-e3
-e4
-e5
-e6
-e7
-e8
-e9
-e10
-- Returns:
-
copyOf
Returns an ImmutableNavigableSet containing the elements of the specified collection. If the provided collection is already an instance of ImmutableNavigableSet, it is directly returned. If the provided collection isnull
or empty, an empty ImmutableNavigableSet is returned. Otherwise, a new ImmutableNavigableSet is created with the elements of the provided collection.- Type Parameters:
E
- the type of elements in the collection- Parameters:
c
- the collection whose elements are to be placed into this set- Returns:
- an ImmutableNavigableSet containing the elements of the specified collection
-
wrap
@Deprecated public static <E> ImmutableSortedSet<E> wrap(SortedSet<? extends E> sortedSet) throws UnsupportedOperationException Deprecated.throwsUnsupportedOperationException
This method is deprecated and will throw an UnsupportedOperationException if used.- 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>
-
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:
-