com.lamatek.util
Class EnumerationToArray

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

public class EnumerationToArray
extends java.lang.Object

A utility class that creates an Object or String array from a java.util.Enumeration instance. You can call the methods in this class directly or you can call the associated methods provided in the blanket class ArrayUtil.


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

Constructor Detail

EnumerationToArray

public EnumerationToArray()
Method Detail

createObjectArray

public static java.lang.Object[] createObjectArray(java.util.Enumeration num)
This static method creates an array of type Object from all the elements in the supplied java.util.Enumeration.

Parameters:
num - - An instance of java.util.Enumeration
Returns:
Object[] An array of type Object

createStringArray

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

Parameters:
v - - An instance of java.util.Vector
Returns:
String[] An array of String