Package org.jf.util
Class ArraySortedSet<T>
- java.lang.Object
-
- org.jf.util.ArraySortedSet<T>
-
- All Implemented Interfaces:
java.lang.Iterable<T>
,java.util.Collection<T>
,java.util.Set<T>
,java.util.SortedSet<T>
public class ArraySortedSet<T> extends java.lang.Object implements java.util.SortedSet<T>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
add(T t)
boolean
addAll(java.util.Collection<? extends T> c)
void
clear()
java.util.Comparator<? super T>
comparator()
boolean
contains(java.lang.Object o)
boolean
containsAll(java.util.Collection<?> c)
boolean
equals(java.lang.Object o)
T
first()
int
hashCode()
java.util.SortedSet<T>
headSet(T toElement)
boolean
isEmpty()
java.util.Iterator<T>
iterator()
T
last()
static <T> ArraySortedSet<T>
of(java.util.Comparator<? super T> comparator, T[] arr)
boolean
remove(java.lang.Object o)
boolean
removeAll(java.util.Collection<?> c)
boolean
retainAll(java.util.Collection<?> c)
int
size()
java.util.SortedSet<T>
subSet(T fromElement, T toElement)
java.util.SortedSet<T>
tailSet(T fromElement)
java.lang.Object[]
toArray()
<T> T[]
toArray(T[] a)
-
-
-
Method Detail
-
of
public static <T> ArraySortedSet<T> of(@Nonnull java.util.Comparator<? super T> comparator, @Nonnull T[] arr)
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
contains
public boolean contains(java.lang.Object o)
-
iterator
public java.util.Iterator<T> iterator()
-
toArray
public java.lang.Object[] toArray()
-
toArray
public <T> T[] toArray(T[] a)
-
add
public boolean add(T t)
-
remove
public boolean remove(java.lang.Object o)
-
containsAll
public boolean containsAll(java.util.Collection<?> c)
-
addAll
public boolean addAll(java.util.Collection<? extends T> c)
-
retainAll
public boolean retainAll(java.util.Collection<?> c)
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
-
clear
public void clear()
-
comparator
public java.util.Comparator<? super T> comparator()
- Specified by:
comparator
in interfacejava.util.SortedSet<T>
-
subSet
public java.util.SortedSet<T> subSet(T fromElement, T toElement)
- Specified by:
subSet
in interfacejava.util.SortedSet<T>
-
headSet
public java.util.SortedSet<T> headSet(T toElement)
- Specified by:
headSet
in interfacejava.util.SortedSet<T>
-
tailSet
public java.util.SortedSet<T> tailSet(T fromElement)
- Specified by:
tailSet
in interfacejava.util.SortedSet<T>
-
hashCode
public int hashCode()
-
-