T - the type of elements maintained by this Collectionpublic class ObjectAVLTreeSet<T> extends AbstractObjectSet<T> implements ObjectNavigableSet<T>
| Constructor and Description |
|---|
ObjectAVLTreeSet()
Default Constructor
|
ObjectAVLTreeSet(java.util.Collection<? extends T> collection)
Deprecated.
|
ObjectAVLTreeSet(java.util.Collection<? extends T> collection,
java.util.Comparator<T> comp)
Deprecated.
|
ObjectAVLTreeSet(java.util.Comparator<T> comp)
Constructor that allows to define the sorter
|
ObjectAVLTreeSet(java.util.Iterator<T> iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ObjectAVLTreeSet(java.util.Iterator<T> iterator,
java.util.Comparator<T> comp)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ObjectAVLTreeSet(ObjectCollection<T> collection)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
ObjectAVLTreeSet(ObjectCollection<T> collection,
java.util.Comparator<T> comp)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
ObjectAVLTreeSet(ObjectIterator<T> iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ObjectAVLTreeSet(ObjectIterator<T> iterator,
java.util.Comparator<T> comp)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ObjectAVLTreeSet(ObjectSortedSet<T> sortedSet)
A Helper constructor that allows to create a Set with exactly the same values as the provided SortedSet.
|
ObjectAVLTreeSet(T[] array)
Helper constructor that allow to create a set from an array
|
ObjectAVLTreeSet(T[] array,
java.util.Comparator<T> comp)
Helper constructor that allow to create a set from an array
|
ObjectAVLTreeSet(T[] array,
int offset,
int length)
Helper constructor that allow to create a set from an array
|
ObjectAVLTreeSet(T[] array,
int offset,
int length,
java.util.Comparator<T> comp)
Helper constructor that allow to create a set from an array
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(T o) |
boolean |
addAndMoveToFirst(T o)
A customized add method that allows you to insert into the first index.
|
boolean |
addAndMoveToLast(T o)
A customized add method that allows you to insert into the last index.
|
T |
ceiling(T e) |
void |
clear() |
java.util.Comparator<T> |
comparator()
A Type Specific Comparator method
|
boolean |
contains(java.lang.Object e) |
ObjectBidirectionalIterator<T> |
descendingIterator() |
ObjectNavigableSet<T> |
descendingSet() |
T |
first() |
T |
floor(T e) |
ObjectNavigableSet<T> |
headSet(T toElement,
boolean inclusive) |
T |
higher(T e) |
ObjectBidirectionalIterator<T> |
iterator()
Returns a Type-Specific Iterator to reduce (un)boxing
|
ObjectBidirectionalIterator<T> |
iterator(T fromElement)
A type Specific Iterator starting from a given key
|
T |
last() |
T |
lower(T e) |
boolean |
moveToFirst(T o)
A specific move method to move a given key to the first index.
|
boolean |
moveToLast(T o)
A specific move method to move a given key to the last index.
|
T |
pollFirst()
A method to get and remove the first element in the set
|
T |
pollLast()
A method to get and remove the last element in the set
|
boolean |
remove(java.lang.Object o) |
int |
size() |
ObjectNavigableSet<T> |
subSet(T fromElement,
boolean fromInclusive,
T toElement,
boolean toInclusive) |
ObjectNavigableSet<T> |
tailSet(T fromElement,
boolean inclusive) |
equals, hashCodeaddAll, addAll, containsAll, containsAny, containsAny, removeAll, retainAllcontainsAll, isEmpty, removeAll, retainAll, toArray, toArray, toStringheadSet, spliterator, subSet, tailSetaddAll, containsAll, containsAny, containsAny, removeAll, retainAllpublic ObjectAVLTreeSet()
public ObjectAVLTreeSet(java.util.Comparator<T> comp)
comp - the function that decides how the tree is sorted, can be nullpublic ObjectAVLTreeSet(T[] array)
array - the elements that should be usedpublic ObjectAVLTreeSet(T[] array, int offset, int length)
array - the elements that should be usedoffset - the starting index within the arraylength - the amount of elements that are within the arrayjava.lang.IllegalStateException - if offset and length causes to step outside of the arrays rangepublic ObjectAVLTreeSet(T[] array, java.util.Comparator<T> comp)
array - the elements that should be usedcomp - the sorter of the tree, can be nullpublic ObjectAVLTreeSet(T[] array, int offset, int length, java.util.Comparator<T> comp)
array - the elements that should be usedoffset - the starting index within the arraylength - the amount of elements that are within the arraycomp - the sorter of the tree, can be nulljava.lang.IllegalStateException - if offset and length causes to step outside of the arrays rangepublic ObjectAVLTreeSet(ObjectSortedSet<T> sortedSet)
sortedSet - the set the elements should be added to the TreeSet@Deprecated public ObjectAVLTreeSet(java.util.Collection<? extends T> collection)
collection - the set the elements should be added to the TreeSet@Deprecated public ObjectAVLTreeSet(java.util.Collection<? extends T> collection, java.util.Comparator<T> comp)
collection - the set the elements should be added to the TreeSetcomp - the sorter of the tree, can be nullpublic ObjectAVLTreeSet(ObjectCollection<T> collection)
collection - the set the elements should be added to the TreeSetpublic ObjectAVLTreeSet(ObjectCollection<T> collection, java.util.Comparator<T> comp)
collection - the set the elements should be added to the TreeSetcomp - the sorter of the tree, can be nullpublic ObjectAVLTreeSet(java.util.Iterator<T> iterator)
iterator - the elements that should be added to the setpublic ObjectAVLTreeSet(java.util.Iterator<T> iterator, java.util.Comparator<T> comp)
iterator - the elements that should be added to the setcomp - the sorter of the tree, can be nullpublic ObjectAVLTreeSet(ObjectIterator<T> iterator)
iterator - the elements that should be added to the setpublic ObjectAVLTreeSet(ObjectIterator<T> iterator, java.util.Comparator<T> comp)
iterator - the elements that should be added to the setcomp - the sorter of the tree, can be nullpublic boolean add(T o)
public boolean addAndMoveToFirst(T o)
ObjectSortedSetaddAndMoveToFirst in interface ObjectSortedSet<T>o - the element that should be insertedSet.add(Object)public boolean addAndMoveToLast(T o)
ObjectSortedSetaddAndMoveToLast in interface ObjectSortedSet<T>o - the element that should be insertedSet.add(Object)public boolean moveToFirst(T o)
ObjectSortedSetmoveToFirst in interface ObjectSortedSet<T>o - that should be moved to the first indexpublic boolean moveToLast(T o)
ObjectSortedSetmoveToLast in interface ObjectSortedSet<T>o - that should be moved to the first lastpublic boolean contains(java.lang.Object e)
public boolean remove(java.lang.Object o)
public T pollFirst()
ObjectSortedSetpollFirst in interface java.util.NavigableSet<T>pollFirst in interface ObjectSortedSet<T>public T pollLast()
ObjectSortedSetpollLast in interface java.util.NavigableSet<T>pollLast in interface ObjectSortedSet<T>public int size()
public void clear()
public java.util.Comparator<T> comparator()
ObjectSortedSetcomparator in interface java.util.SortedSet<T>comparator in interface ObjectSortedSet<T>public ObjectBidirectionalIterator<T> iterator()
ObjectCollectioniterator in interface java.lang.Iterable<T>iterator in interface java.util.Collection<T>iterator in interface java.util.NavigableSet<T>iterator in interface java.util.Set<T>iterator in interface ObjectCollection<T>iterator in interface ObjectIterable<T>iterator in interface ObjectNavigableSet<T>iterator in interface ObjectSet<T>iterator in interface ObjectSortedSet<T>iterator in class AbstractObjectSet<T>Collection.iterator()public ObjectBidirectionalIterator<T> iterator(T fromElement)
ObjectSortedSetiterator in interface ObjectSortedSet<T>fromElement - the element the iterator should start frompublic ObjectBidirectionalIterator<T> descendingIterator()
descendingIterator in interface java.util.NavigableSet<T>descendingIterator in interface ObjectNavigableSet<T>public ObjectNavigableSet<T> subSet(T fromElement, boolean fromInclusive, T toElement, boolean toInclusive)
subSet in interface java.util.NavigableSet<T>subSet in interface ObjectNavigableSet<T>public ObjectNavigableSet<T> headSet(T toElement, boolean inclusive)
headSet in interface java.util.NavigableSet<T>headSet in interface ObjectNavigableSet<T>public ObjectNavigableSet<T> tailSet(T fromElement, boolean inclusive)
tailSet in interface java.util.NavigableSet<T>tailSet in interface ObjectNavigableSet<T>public ObjectNavigableSet<T> descendingSet()
descendingSet in interface java.util.NavigableSet<T>descendingSet in interface ObjectNavigableSet<T>