| java.util.Vector com.salmonllc.util.VectorSort
All known Subclasses: com.salmonllc.html.OptionsSort,
VectorSort | abstract public class VectorSort extends java.util.Vector (Code) | | This utility class extends a java.util.Vector by implementing a method that can sort the vector. You must subclass it and implement the compare method. The compare method must have specific knowledge of the types of components on the vector and determine if one object is greater then another.
|
Constructor Summary | |
public | VectorSort() Constructs an empty vector. | public | VectorSort(int initialCapacity) Constructs an empty vector with the specified initial capacity. | public | VectorSort(int initialCapacity, int capacityIncrement) Constructs an empty vector with the specified initial capacity and
capacity increment. |
Method Summary | |
abstract public boolean | compare(Object o1, Object o2) The compare method is passed two objects from the vector and must return true if Object2 is greater then Object1 for an ascending sort or true if Object2 is less then Object1 for a descending sort. | public void | sort() |
VectorSort | public VectorSort()(Code) | | Constructs an empty vector.
since: JDK1.0 |
VectorSort | public VectorSort(int initialCapacity)(Code) | | Constructs an empty vector with the specified initial capacity.
Parameters: initialCapacity - the initial capacity of the vector. since: JDK1.0 |
VectorSort | public VectorSort(int initialCapacity, int capacityIncrement)(Code) | | Constructs an empty vector with the specified initial capacity and
capacity increment.
Parameters: initialCapacity - the initial capacity of the vector. Parameters: capacityIncrement - the amount by which the capacity isincreased when the vector overflows. since: JDK1.0 |
compare | abstract public boolean compare(Object o1, Object o2)(Code) | | The compare method is passed two objects from the vector and must return true if Object2 is greater then Object1 for an ascending sort or true if Object2 is less then Object1 for a descending sort.
Parameters: o1 - The first object to compare Parameters: o2 - The second object to compare |
sort | public void sort()(Code) | | Sorts the Vector
|
|
|