T
- type of values storedpublic class AATreeSet<T extends Comparable> extends AbstractSet<T> implements SortedSet<T>
Modifier and Type | Class and Description |
---|---|
static class |
AATreeSet.AbstractTreeNode<E>
Abstract node implementation that can be extended with a custom payload.
|
static interface |
AATreeSet.Node<E>
Interface implemented by nodes within this tree.
|
Constructor and Description |
---|
AATreeSet() |
Modifier and Type | Method and Description |
---|---|
boolean |
add(T o) |
void |
clear() |
Comparator<? super T> |
comparator() |
T |
find(Object probe)
Find the node within this tree equal to the probe node.
|
T |
first() |
protected AATreeSet.Node<T> |
getRoot()
Returns the root node of this tree.
|
SortedSet<T> |
headSet(T toElement) |
boolean |
isEmpty() |
Iterator<T> |
iterator() |
T |
last() |
boolean |
remove(Object o) |
T |
removeAndReturn(Object o)
Remove the node matching this object and return it.
|
int |
size() |
SortedSet<T> |
subSet(T fromElement,
T toElement) |
SortedSet<T> |
tailSet(T fromElement) |
equals, hashCode, removeAll
addAll, contains, containsAll, retainAll, toArray, toArray, toString
public boolean add(T o)
add
in interface Collection<T extends Comparable>
add
in interface Set<T extends Comparable>
add
in class AbstractCollection<T extends Comparable>
public boolean remove(Object o)
remove
in interface Collection<T extends Comparable>
remove
in interface Set<T extends Comparable>
remove
in class AbstractCollection<T extends Comparable>
public T removeAndReturn(Object o)
public void clear()
clear
in interface Collection<T extends Comparable>
clear
in interface Set<T extends Comparable>
clear
in class AbstractCollection<T extends Comparable>
public Iterator<T> iterator()
iterator
in interface Iterable<T extends Comparable>
iterator
in interface Collection<T extends Comparable>
iterator
in interface Set<T extends Comparable>
iterator
in class AbstractCollection<T extends Comparable>
public int size()
size
in interface Collection<T extends Comparable>
size
in interface Set<T extends Comparable>
size
in class AbstractCollection<T extends Comparable>
public boolean isEmpty()
isEmpty
in interface Collection<T extends Comparable>
isEmpty
in interface Set<T extends Comparable>
isEmpty
in class AbstractCollection<T extends Comparable>
public Comparator<? super T> comparator()
comparator
in interface SortedSet<T extends Comparable>
public SortedSet<T> subSet(T fromElement, T toElement)
subSet
in interface SortedSet<T extends Comparable>
public SortedSet<T> headSet(T toElement)
headSet
in interface SortedSet<T extends Comparable>
public SortedSet<T> tailSet(T fromElement)
tailSet
in interface SortedSet<T extends Comparable>
public T first()
first
in interface SortedSet<T extends Comparable>
public T last()
last
in interface SortedSet<T extends Comparable>
protected final AATreeSet.Node<T> getRoot()
Copyright © 2003-2013 Terracotta, Inc.. All Rights Reserved.