Package net.morimekta.util.collect
Class UnmodifiableSortedSet<E>
- java.lang.Object
-
- net.morimekta.util.collect.UnmodifiableCollection<E>
-
- net.morimekta.util.collect.UnmodifiableSortedSet<E>
-
- All Implemented Interfaces:
java.lang.Iterable<E>
,java.util.Collection<E>
,java.util.Set<E>
,java.util.SortedSet<E>
@Immutable public class UnmodifiableSortedSet<E> extends UnmodifiableCollection<E> implements java.util.SortedSet<E>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
UnmodifiableSortedSet.Builder<E>
-
Field Summary
-
Fields inherited from class net.morimekta.util.collect.UnmodifiableCollection
array, length, offset
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <E extends java.lang.Comparable<E>>
UnmodifiableSortedSet.Builder<E>builderNaturalOrder()
static <E extends java.lang.Comparable<E>>
UnmodifiableSortedSet.Builder<E>builderNaturalOrder(int initialCapacity)
static <E> UnmodifiableSortedSet.Builder<E>
builderOrderedBy(int initialCapacity, java.util.Comparator<E> comparator)
static <E> UnmodifiableSortedSet.Builder<E>
builderOrderedBy(java.util.Comparator<E> comparator)
static <E extends java.lang.Comparable<E>>
UnmodifiableSortedSet.Builder<E>builderReverseOrder()
static <E extends java.lang.Comparable<E>>
UnmodifiableSortedSet.Builder<E>builderReverseOrder(int initialCapacity)
java.util.Comparator<E>
comparator()
boolean
contains(java.lang.Object o)
static <E> UnmodifiableSortedSet<E>
copyOf(E[] array)
static <E> UnmodifiableSortedSet<E>
copyOf(java.lang.Iterable<? extends E> iterable)
static <E> UnmodifiableSortedSet<E>
copyOf(java.util.Collection<? extends E> collection)
static <E extends java.lang.Comparable<E>>
UnmodifiableSortedSet<E>copyOf(java.util.Enumeration<? extends E> enumeration)
static <E> UnmodifiableSortedSet<E>
copyOf(java.util.Iterator<? extends E> iterator)
boolean
equals(java.lang.Object obj)
E
first()
int
hashCode()
UnmodifiableSortedSet<E>
headSet(E end)
E
last()
static <E> UnmodifiableSortedSet<E>
sortedSetOf()
static <E> UnmodifiableSortedSet<E>
sortedSetOf(E e)
static <E> UnmodifiableSortedSet<E>
sortedSetOf(E e1, E e2)
static <E> UnmodifiableSortedSet<E>
sortedSetOf(E e1, E e2, E e3)
static <E> UnmodifiableSortedSet<E>
sortedSetOf(E e1, E e2, E e3, E e4)
static <E> UnmodifiableSortedSet<E>
sortedSetOf(E e1, E e2, E e3, E e4, E e5)
static <E> UnmodifiableSortedSet<E>
sortedSetOf(E e1, E e2, E e3, E e4, E e5, E e6)
static <E> UnmodifiableSortedSet<E>
sortedSetOf(E e1, E e2, E e3, E e4, E e5, E e6, E e7)
static <E> UnmodifiableSortedSet<E>
sortedSetOf(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8)
static <E> UnmodifiableSortedSet<E>
sortedSetOf(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8, E e9)
static <E> UnmodifiableSortedSet<E>
sortedSetOf(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8, E e9, E e10, E... more)
UnmodifiableSortedSet<E>
subSet(E start, E end)
UnmodifiableSortedSet<E>
tailSet(E start)
java.lang.String
toString()
-
Methods inherited from class net.morimekta.util.collect.UnmodifiableCollection
add, addAll, asList, clear, containsAll, isEmpty, iterator, remove, removeAll, removeIf, retainAll, size, toArray, toArray
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
copyOf
@Nonnull public static <E> UnmodifiableSortedSet<E> copyOf(E[] array)
-
copyOf
@Nonnull public static <E> UnmodifiableSortedSet<E> copyOf(java.lang.Iterable<? extends E> iterable)
-
copyOf
@Nonnull public static <E> UnmodifiableSortedSet<E> copyOf(java.util.Iterator<? extends E> iterator)
-
copyOf
@Nonnull public static <E extends java.lang.Comparable<E>> UnmodifiableSortedSet<E> copyOf(java.util.Enumeration<? extends E> enumeration)
-
copyOf
@Nonnull public static <E> UnmodifiableSortedSet<E> copyOf(java.util.Collection<? extends E> collection)
-
sortedSetOf
@Nonnull public static <E> UnmodifiableSortedSet<E> sortedSetOf()
-
sortedSetOf
@Nonnull public static <E> UnmodifiableSortedSet<E> sortedSetOf(E e)
-
sortedSetOf
@Nonnull public static <E> UnmodifiableSortedSet<E> sortedSetOf(E e1, E e2)
-
sortedSetOf
@Nonnull public static <E> UnmodifiableSortedSet<E> sortedSetOf(E e1, E e2, E e3)
-
sortedSetOf
@Nonnull public static <E> UnmodifiableSortedSet<E> sortedSetOf(E e1, E e2, E e3, E e4)
-
sortedSetOf
@Nonnull public static <E> UnmodifiableSortedSet<E> sortedSetOf(E e1, E e2, E e3, E e4, E e5)
-
sortedSetOf
@Nonnull public static <E> UnmodifiableSortedSet<E> sortedSetOf(E e1, E e2, E e3, E e4, E e5, E e6)
-
sortedSetOf
@Nonnull public static <E> UnmodifiableSortedSet<E> sortedSetOf(E e1, E e2, E e3, E e4, E e5, E e6, E e7)
-
sortedSetOf
@Nonnull public static <E> UnmodifiableSortedSet<E> sortedSetOf(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8)
-
sortedSetOf
@Nonnull public static <E> UnmodifiableSortedSet<E> sortedSetOf(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8, E e9)
-
sortedSetOf
@Nonnull @SafeVarargs public static <E> UnmodifiableSortedSet<E> sortedSetOf(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8, E e9, E e10, E... more)
-
builderOrderedBy
public static <E> UnmodifiableSortedSet.Builder<E> builderOrderedBy(java.util.Comparator<E> comparator)
-
builderOrderedBy
public static <E> UnmodifiableSortedSet.Builder<E> builderOrderedBy(int initialCapacity, java.util.Comparator<E> comparator)
-
builderNaturalOrder
public static <E extends java.lang.Comparable<E>> UnmodifiableSortedSet.Builder<E> builderNaturalOrder()
-
builderNaturalOrder
public static <E extends java.lang.Comparable<E>> UnmodifiableSortedSet.Builder<E> builderNaturalOrder(int initialCapacity)
-
builderReverseOrder
public static <E extends java.lang.Comparable<E>> UnmodifiableSortedSet.Builder<E> builderReverseOrder()
-
builderReverseOrder
public static <E extends java.lang.Comparable<E>> UnmodifiableSortedSet.Builder<E> builderReverseOrder(int initialCapacity)
-
equals
public boolean equals(java.lang.Object obj)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
-
contains
public boolean contains(java.lang.Object o)
- Specified by:
contains
in interfacejava.util.Collection<E>
- Specified by:
contains
in interfacejava.util.Set<E>
- Overrides:
contains
in classUnmodifiableCollection<E>
-
comparator
public java.util.Comparator<E> comparator()
- Specified by:
comparator
in interfacejava.util.SortedSet<E>
-
subSet
@Nonnull public UnmodifiableSortedSet<E> subSet(@Nonnull E start, @Nonnull E end)
- Specified by:
subSet
in interfacejava.util.SortedSet<E>
-
headSet
@Nonnull public UnmodifiableSortedSet<E> headSet(@Nonnull E end)
- Specified by:
headSet
in interfacejava.util.SortedSet<E>
-
tailSet
@Nonnull public UnmodifiableSortedSet<E> tailSet(@Nonnull E start)
- Specified by:
tailSet
in interfacejava.util.SortedSet<E>
-
-