scale.common
Class Vector

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--java.util.Vector
                    |
                    +--scale.common.Vector
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, java.util.List, java.io.Serializable

public class Vector
extends java.util.Vector
implements java.lang.Cloneable, java.io.Serializable

Extend the java.util.Vector class so that we may collect statictics on the number of Vectors in use.

$Id: Vector.java,v 1.10 2002/01/03 21:44:41 burrill Exp $

Copyright 2002 by the Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.

See Also:
Serialized Form

Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
Vector()
          Constructs an empty vector.
Vector(int initialCapacity)
          Constructs an empty vector with the specified initial capacity.
Vector(int initialCapacity, int capacityIncrement)
          Constructs an empty vector with the specified initial capacity and capacity increment.
 
Method Summary
 void addVectors(java.util.Enumeration e)
          Add the elements of an enumeration to this Vector.
 void addVectors(java.lang.Object[] c)
          Add the elements of an array to this Vector.
 void addVectors(Vector c)
          Add the elements of a Vector to this vector.
 java.lang.Object clone()
          Returns a clone of this vector.
static int created()
          Return the number of instances of this class that have been created.
protected  void finalize()
          Keep the count of instances up-to-date.
static int number()
          Return the current number of instances of this class.
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, 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
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Constructor Detail

Vector

public Vector(int initialCapacity,
              int capacityIncrement)
Constructs an empty vector with the specified initial capacity and capacity increment.
Parameters:
initialCapacity - the initial capacity of the vector.
capacityIncrement - the amount by which the capacity is increased when the vector overflows.

Vector

public Vector(int initialCapacity)
Constructs an empty vector with the specified initial capacity.
Parameters:
initialCapacity - the initial capacity of the vector.

Vector

public Vector()
Constructs an empty vector.
Method Detail

finalize

protected void finalize()
                 throws java.lang.Throwable
Keep the count of instances up-to-date.
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable - [needs description]

number

public static int number()
Return the current number of instances of this class.

created

public static int created()
Return the number of instances of this class that have been created.

clone

public java.lang.Object clone()
Returns a clone of this vector.
Overrides:
clone in class java.util.Vector

addVectors

public final void addVectors(java.lang.Object[] c)
Add the elements of an array to this Vector.

addVectors

public final void addVectors(Vector c)
Add the elements of a Vector to this vector.

addVectors

public final void addVectors(java.util.Enumeration e)
Add the elements of an enumeration to this Vector.