public class ImmutableSortedSet<E> extends ImmutableSet<E> implements java.util.SortedSet<E>
Modifier and Type | Method and Description |
---|---|
boolean |
add(E e)
Deprecated.
Unsupported operation.
|
boolean |
addAll(java.util.Collection<? extends E> newElements)
Deprecated.
Unsupported operation.
|
void |
clear()
Deprecated.
Unsupported operation.
|
java.util.Comparator<? super E> |
comparator() |
boolean |
contains(java.lang.Object o) |
static <E> ImmutableSet<E> |
copyOf(java.util.Collection<? extends E> set)
Deprecated.
|
static <E> ImmutableSortedSet<E> |
copyOf(java.util.SortedSet<? extends E> sortedSet) |
static <E> ImmutableSortedSet<E> |
empty() |
boolean |
equals(java.lang.Object obj) |
E |
first() |
int |
hashCode() |
java.util.SortedSet<E> |
headSet(E toElement) |
java.util.Iterator<E> |
iterator() |
E |
last() |
static <E extends java.lang.Comparable<? super E>> |
of(E... a) |
static <E> ImmutableSet<E> |
of(java.util.Set<? extends E> set)
Deprecated.
|
static <E> ImmutableSortedSet<E> |
of(java.util.SortedSet<? extends E> sortedSet) |
boolean |
remove(java.lang.Object object)
Deprecated.
Unsupported operation.
|
boolean |
removeAll(java.util.Collection<?> oldElements)
Deprecated.
Unsupported operation.
|
boolean |
removeIf(java.util.function.Predicate<? super E> filter)
Deprecated.
Unsupported operation.
|
boolean |
retainAll(java.util.Collection<?> elementsToKeep)
Deprecated.
Unsupported operation.
|
int |
size() |
Stream<E> |
streamm() |
java.util.SortedSet<E> |
subSet(E fromElement,
E toElement) |
java.util.SortedSet<E> |
tailSet(E fromElement) |
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
java.lang.String |
toString() |
public static <E> ImmutableSortedSet<E> empty()
@SafeVarargs public static <E extends java.lang.Comparable<? super E>> ImmutableSortedSet<E> of(E... a)
public static <E> ImmutableSortedSet<E> of(java.util.SortedSet<? extends E> sortedSet)
sortedSet
- the elements in this Set
are shared by the returned ImmutableSortedSet.public static <E> ImmutableSortedSet<E> copyOf(java.util.SortedSet<? extends E> sortedSet)
sortedSet
- @Deprecated public static <E> ImmutableSet<E> of(java.util.Set<? extends E> set)
@Deprecated public static <E> ImmutableSet<E> copyOf(java.util.Collection<? extends E> set)
public java.util.Comparator<? super E> comparator()
comparator
in interface java.util.SortedSet<E>
public java.util.SortedSet<E> subSet(E fromElement, E toElement)
subSet
in interface java.util.SortedSet<E>
public java.util.SortedSet<E> headSet(E toElement)
headSet
in interface java.util.SortedSet<E>
public java.util.SortedSet<E> tailSet(E fromElement)
tailSet
in interface java.util.SortedSet<E>
@Deprecated public final boolean add(E e)
add
in interface java.util.Collection<E>
add
in class java.util.AbstractCollection<E>
@Deprecated public final boolean addAll(java.util.Collection<? extends E> newElements)
addAll
in interface java.util.Collection<E>
addAll
in class java.util.AbstractCollection<E>
@Deprecated public final boolean remove(java.lang.Object object)
remove
in interface java.util.Collection<E>
remove
in class java.util.AbstractCollection<E>
@Deprecated public boolean removeIf(java.util.function.Predicate<? super E> filter)
@Deprecated public final boolean removeAll(java.util.Collection<?> oldElements)
removeAll
in interface java.util.Collection<E>
removeAll
in class java.util.AbstractCollection<E>
@Deprecated public final boolean retainAll(java.util.Collection<?> elementsToKeep)
retainAll
in interface java.util.Collection<E>
retainAll
in class java.util.AbstractCollection<E>
@Deprecated public final void clear()
clear
in interface java.util.Collection<E>
clear
in class java.util.AbstractCollection<E>
public boolean contains(java.lang.Object o)
contains
in interface java.util.Collection<E>
contains
in class java.util.AbstractCollection<E>
public java.util.Iterator<E> iterator()
iterator
in interface java.lang.Iterable<E>
iterator
in interface java.util.Collection<E>
iterator
in class java.util.AbstractCollection<E>
public int size()
size
in interface java.util.Collection<E>
size
in class java.util.AbstractCollection<E>
public java.lang.Object[] toArray()
toArray
in interface java.util.Collection<E>
toArray
in class java.util.AbstractCollection<E>
public <T> T[] toArray(T[] a)
toArray
in interface java.util.Collection<E>
toArray
in class java.util.AbstractCollection<E>
public Stream<E> streamm()
public boolean equals(java.lang.Object obj)
equals
in interface java.util.Collection<E>
equals
in class java.lang.Object
public int hashCode()
hashCode
in interface java.util.Collection<E>
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.util.AbstractCollection<E>