com.conradroche.matra.util
Class Caster

java.lang.Object
  |
  +--com.conradroche.matra.util.Caster

public class Caster
extends java.lang.Object

Utility class for Casting an array object from one type to another.

Author:
Conrad Roche

Method Summary
 java.lang.String[] convertToStringArray(java.util.Collection coll)
          Convert a Collection to a String Array.
static Caster getInstance()
          Method to return the single instance of Caster.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static Caster getInstance()
Method to return the single instance of Caster.
Returns:
The singleton instance.

convertToStringArray

public java.lang.String[] convertToStringArray(java.util.Collection coll)
Convert a Collection to a String Array. The assumption is that all the elements of this collection are String.
Parameters:
coll - The collection to be casted.
Returns:
The String[] with the data in the collection.