com.lamatek.util
Class VectorToArray

java.lang.Object
  extended by com.lamatek.util.VectorToArray

public class VectorToArray
extends java.lang.Object

A utility class to create an array from an instance of Vector. You can call the methods in this class directly or use the blanket class ArrayUtil.


Constructor Summary
VectorToArray()
           
 
Method Summary
static java.lang.Object[] createObjectArray(java.util.Vector v)
          A static method that creates an array of type Object from the elements in the supplied Vector.
static java.lang.String[] createStringArray(java.util.Vector v)
          A convenience method that creates an array of type String from the elements in the supplied Vector.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VectorToArray

public VectorToArray()
Method Detail

createObjectArray

public static java.lang.Object[] createObjectArray(java.util.Vector v)
A static method that creates an array of type Object from the elements in the supplied Vector.

Parameters:
v - - An instance of java.util.Vector
Returns:
Object[] An Object array created from the elements in the supplied Vector

createStringArray

public static java.lang.String[] createStringArray(java.util.Vector v)
A convenience method that creates an array of type String from the elements in the supplied Vector. This method should only be used if it is known that all elements in the array are of type java.lang.String. Otherwise use the createObjectArray method.

Parameters:
v - - An instance of java.util.Vector
Returns:
String[] A string array created from the elements in the supplied Vector.