Class TreeTest.OrderedVector

All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, java.util.List, java.util.RandomAccess,
Enclosing class:

private class TreeTest.OrderedVector
extends java.util.Vector

An ordered version of the Vector object.

Nested Class Summary
Nested classes inherited from class java.util.AbstractList
Field Summary
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
Fields inherited from class java.util.AbstractList
Constructor Summary
Method Summary
 boolean add(java.lang.Object obj)
          Override the Vector add(Object) method.
Methods inherited from class java.util.Vector
add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.List
iterator, listIterator, listIterator

Constructor Detail


public TreeTest.OrderedVector()
Method Detail


public boolean add(java.lang.Object obj)
Override the Vector add(Object) method.

The method implements and ordered insert. All elements in the ordered vector are unique (so if the Integer is found in the Vector it will not be added).

This algorithm has an N2 worst case time complexity so it is not designed for efficiency.

Specified by:
add in interface java.util.List
add in class java.util.Vector