goldman.collection.ordered
Class TopDownBTree<E>
java.lang.Object
goldman.collection.AbstractCollection<E>
goldman.collection.ordered.AbstractSearchTree<E>
goldman.collection.ordered.BTree<E>
goldman.collection.ordered.TopDownBTree<E>
- All Implemented Interfaces:
- Collection<E>, OrderedCollection<E>, Iterable<E>
public class TopDownBTree<E>
- extends BTree<E>
- implements OrderedCollection<E>
The top down B-tree implements a variation of a B-tree
that uses top-down (versus bottom-up) insertion and deletion.
Nested classes/interfaces inherited from class goldman.collection.ordered.BTree |
BTree.Marker |
Methods inherited from class goldman.collection.AbstractCollection |
accept, addAll, checkRep, compare, ensureCapacity, equivalent, getCapacity, getComparator, getElementAtRank, getElementAtRank, getSize, isEmpty, retainAll, toArray, toArray, toString, trimToSize |
Methods inherited from interface goldman.collection.Collection |
accept, add, addAll, checkRep, clear, contains, ensureCapacity, getCapacity, getComparator, getLocator, getSize, isEmpty, iterator, retainAll, toArray, toArray, toString, trimToSize |
TopDownBTree
public TopDownBTree()
TopDownBTree
public TopDownBTree(int t)
TopDownBTree
public TopDownBTree(Comparator<? super E> comp,
int t)
insert
protected AbstractSearchTree.TreeNode insert(E element)
- Description copied from class:
AbstractSearchTree
- Inserts it into the collection
- Overrides:
insert
in class BTree<E>
- Parameters:
element
- the new element
- Returns:
- a reference to the newly added B-tree node
remove
public boolean remove(E element)
- Description copied from class:
AbstractSearchTree
- Removes an arbitrary element in the collection equivalent to
element
, if any
- Specified by:
remove
in interface Collection<E>
- Overrides:
remove
in class AbstractSearchTree<E>
- Parameters:
element
- the element to be removed
- Returns:
- true if and only if an element is removed.