|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||
java.lang.Object
|
+--java.util.AbstractCollection
|
+--java.util.AbstractList
|
+--java.util.Vector
|
+--MyVector
Adds methods to pick elements from a vector
| Fields inherited from class java.util.Vector |
capacityIncrement, elementCount, elementData |
| Fields inherited from class java.util.AbstractList |
modCount |
| Constructor Summary | |
MyVector(int argSize)
Mimic the superclass constructor |
|
| Method Summary | |
java.lang.Object |
findByName(java.lang.String name)
Find an element in the vector given its name |
(package private) java.lang.Object |
randomEntry()
Selects an element at random from the vector |
java.lang.Object |
select(java.lang.String prompt)
Displays a window showing the elements of the vector in order, allows the user to select one, and returns the result, or null. |
| Methods inherited from class java.util.Vector |
add, 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 |
|
| Methods inherited from interface java.util.List |
iterator, listIterator, listIterator |
| Constructor Detail |
public MyVector(int argSize)
| Method Detail |
public java.lang.Object findByName(java.lang.String name)
throws CantFindObjectException
a - case-insensitive name for which we want to searchCantFindObjectException - if no matching object is foundjava.lang.Object randomEntry()
public java.lang.Object select(java.lang.String prompt)
prompt - a title for the selection window
|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||