Class tred.ListObject
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class tred.ListObject

java.lang.Object
   |
   +----tred.ListObject

public class ListObject
extends Object
This is a ListObject class that will store a list of objects.

Constructor Index

 o ListObject()
This is the constructor for ListObject.

Method Index

 o add(Object)
This method inserts object as an element at the first position.
 o append(Object)
This method appends the new object to the list.
 o elements()
return an Enumeration for the current list of elements.
 o firstElement()
 o indexOf(Object)
 o insert(Object, Object)
This method inserts object as an element at the position after object after.
 o insertBefore(Object, Object)
This method inserts object as an element at the position before object befObj.
 o lastElement()
 o remove(Object)
Deletes the element object from the vector.
 o size()
 o toString()

Constructors

 o ListObject
  public ListObject()
This is the constructor for ListObject. A new empty Vector is allocated for the elements this ListObject contains.

Methods

 o firstElement
  public Object firstElement()
 o lastElement
  public Object lastElement()
 o remove
  public void remove(Object object)
Deletes the element object from the vector. If the object is not an element, remove reports an error to the standard err.
 o add
  public void add(Object object)
This method inserts object as an element at the first position. Elements in the vector are shifted over to make room.
 o insert
  public void insert(Object object,
                     Object after)
This method inserts object as an element at the position after object after. Elements in the vector are shifted over to make room. If object after is not in the vector a new element is inserted at the first position.
 o insertBefore
  public void insertBefore(Object object,
                           Object befObj)
This method inserts object as an element at the position before object befObj. Elements in the vector are shifted over to make room. If object befObj is not in the vector a new element is inserted at the first position.
 o append
  public void append(Object object)
This method appends the new object to the list.
 o indexOf
  public int indexOf(Object obj)
 o elements
  public Enumeration elements()
return an Enumeration for the current list of elements.
 o size
  public int size()
Returns:
the number of elements currently in the vector. Note that this is not the same as the Vector's capacity.
 o toString
  public String toString()
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index