|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jds.util.VisualVector
VisualVector - indexed collection with graphical display; for use with book Classic Data Structures in Java by Timothy A Budd, published by Addison-Wesley, 2001.
Indexed
, Serialized FormConstructor Summary | |
VisualVector(Indexed data)
initialize new visual vector |
Method Summary | |
void |
addElementAt(java.lang.Object val,
int index)
add a new element into the collection, making collection one element larger |
java.lang.Object |
elementAt(int indx)
find value at specific index location |
java.util.Enumeration |
elements()
Yields enumerator for collection |
java.awt.Panel |
getPanel()
yield a panel that will display the contents of the vector |
boolean |
isEmpty()
Determines whether the collection is empty |
void |
removeElementAt(int index)
remove a value from a collection, making collection one element smaller |
void |
setElementAt(java.lang.Object v,
int indx)
set value at specific location |
void |
setSize(int size)
set number of elements in collection |
int |
size()
Determines number of elements in collection |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public VisualVector(Indexed data)
data
- the vector to be displayedMethod Detail |
public void setSize(int size)
size
- the new size of the collectionpublic boolean isEmpty()
public int size()
public java.util.Enumeration elements()
Enumeration
that will yield the elements of the collectionEnumeration
public java.lang.Object elementAt(int indx)
index
- the index of the desired valuepublic void setElementAt(java.lang.Object v, int indx)
v
- the value to be insertedindex
- the position at which value will be insertedpublic void addElementAt(java.lang.Object val, int index)
val
- the value to be insertedindex
- the position at which value will be inserted, other elements will be moved upwardspublic void removeElementAt(int index)
index
- the index of the element to be removedpublic java.awt.Panel getPanel()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |