collections.sortable
Class SortableVector
java.lang.Object
collections.sortable.SortableVector
public class SortableVector
- extends java.lang.Object
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SortableVector
public SortableVector()
main
public static void main(java.lang.String[] args)
throws java.io.FileNotFoundException
- Throws:
java.io.FileNotFoundException
copyInto
public void copyInto(java.lang.Object[] o)
find
public int find(java.lang.Comparable key,
int startPoint)
- Start looking from the startPoint for the
key
and return the location,
if you find it. Return -1 if you do not
find it.
- Parameters:
key
- startPoint
-
getStrings
public java.lang.String[] getStrings()
print
public void print()
bubbleSort
public void bubbleSort()
isEmpty
public boolean isEmpty()
contains
public boolean contains(java.lang.Comparable o)
toArray
public java.lang.Comparable[] toArray()
remove
public boolean remove(java.lang.Comparable o)
add
public boolean add(java.lang.Comparable o)
size
public int size()
elementAt
public java.lang.Comparable elementAt(int index)
setElementAt
public void setElementAt(java.lang.Comparable obj,
int index)
removeElementAt
public void removeElementAt(int index)
sort
public void sort(java.util.Comparator c)
addElement
public void addElement(java.lang.Comparable obj)
sort
public void sort()
removeDuplicates
public void removeDuplicates()