All Packages Class Hierarchy This Package Previous Next Index
Class jgl.VectorArray
java.lang.Object
|
+----jgl.ArrayAdapter
|
+----jgl.VectorArray
- public class VectorArray
- extends ArrayAdapter
VectorArray allows a java.util.Vector to be accessed like a Container.
It is particularly useful for applying generic algorithms like Sorting.sort()
to a java.util.Vector.
- Version:
- JOS-FileSystem 4 Preview (25-Mar-98)
- Author:
- ObjectSpace, Inc.
-
VectorArray(Vector)
-
-
VectorArray(VectorArray)
-
-
add(Object)
- Add an object to myself.
-
at(int)
- Return the object at the specified index.
-
clear()
- Remove all of my objects.
-
clone()
- Return a shallow copy of myself.
-
elements()
- Return an Enumeration of my elements.
-
equals(Object)
- Return true if I'm equal to a specified object.
-
finish()
- Return an iterator positioned immediately after my last item.
-
maxSize()
- Return the maximum number of objects that I can contain.
-
popBack()
- Remove and return my last element.
-
popFront()
- Remove and return my first element.
-
pushBack(Object)
- Add an object at my end.
-
pushFront(Object)
- Insert an object in front of my first element.
-
put(int, Object)
- Set the object at a specified index.
-
remove(int, int, Object)
- Remove all elements within a specified range that match a particular object
and return the number of objects that were removed.
-
remove(Object)
- Remove all elements that match a specified object and return the number of
objects that were removed.
-
size()
- Return the number of objects that I contain.
-
start()
- Return an iterator positioned at my first item.
-
toString()
- Return a string that describes me.
VectorArray
public VectorArray(Vector vector)
VectorArray
public VectorArray(VectorArray vector)
clone
public Object clone()
- Return a shallow copy of myself.
- Overrides:
- clone in class ArrayAdapter
toString
public String toString()
- Return a string that describes me.
- Overrides:
- toString in class Object
equals
public boolean equals(Object object)
- Return true if I'm equal to a specified object.
- Parameters:
- object - The object to compare myself against.
- Returns:
- true if I'm equal to the specified object.
- Overrides:
- equals in class ArrayAdapter
size
public int size()
- Return the number of objects that I contain.
maxSize
public int maxSize()
- Return the maximum number of objects that I can contain.
elements
public Enumeration elements()
- Return an Enumeration of my elements.
start
public ForwardIterator start()
- Return an iterator positioned at my first item.
finish
public ForwardIterator finish()
- Return an iterator positioned immediately after my last item.
at
public Object at(int index)
- Return the object at the specified index.
- Parameters:
- index - The index.
put
public void put(int index,
Object object)
- Set the object at a specified index. The object must be a Integer
- Parameters:
- index - The index.
- object - The object to place at the specified index.
- Throws:
IndexOutOfBoundsException
- if index is not in range.
clear
public void clear()
- Remove all of my objects.
- Overrides:
- clear in class ArrayAdapter
add
public Object add(Object object)
- Add an object to myself.
- Overrides:
- add in class ArrayAdapter
pushFront
public void pushFront(Object object)
- Insert an object in front of my first element.
- Parameters:
- object - The object to insert.
- Overrides:
- pushFront in class ArrayAdapter
popFront
public Object popFront()
- Remove and return my first element.
- Overrides:
- popFront in class ArrayAdapter
pushBack
public void pushBack(Object object)
- Add an object at my end.
- Parameters:
- object - The object to add.
- Overrides:
- pushBack in class ArrayAdapter
popBack
public Object popBack()
- Remove and return my last element.
- Overrides:
- popBack in class ArrayAdapter
remove
public int remove(Object object)
- Remove all elements that match a specified object and return the number of
objects that were removed.
- Parameters:
- object - The object to remove.
- Overrides:
- remove in class ArrayAdapter
remove
public int remove(int first,
int last,
Object object)
- Remove all elements within a specified range that match a particular object
and return the number of objects that were removed.
- Parameters:
- first - The index of the first object to remove.
- last - The index of the last object to remove.
- object - The object to remove.
- Throws:
IndexOutOfBoundsException
- If either index is invalid.
- Overrides:
- remove in class ArrayAdapter
All Packages Class Hierarchy This Package Previous Next Index