OMS (v3.0.25)

oms3
Class Conversions

java.lang.Object
  extended by oms3.Conversions

public class Conversions
extends java.lang.Object

Conversion Utilities. This class deals with conversion from string values to some known types.

Author:
Olaf David

Field Summary
static boolean debug
           
 
Constructor Summary
Conversions()
           
 
Method Summary
static
<T> T
convert(java.lang.Object from, java.lang.Class<? extends T> to)
           
static
<T> T
convert(java.lang.Object from, java.lang.Class<? extends T> to, java.lang.Object... arg)
          Convert a String value into an object of a certain type
static java.lang.String formatISO(java.util.Date date)
           
static java.text.SimpleDateFormat ISO()
           
static void main(java.lang.String[] args)
           
static java.lang.String[] parseArrayElement(java.lang.String src)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

public static boolean debug
Constructor Detail

Conversions

public Conversions()
Method Detail

convert

public static <T> T convert(java.lang.Object from,
                            java.lang.Class<? extends T> to,
                            java.lang.Object... arg)
Convert a String value into an object of a certain type

Parameters:
to - the type to convert to
from - the value to convert
arg - conversion argument (e.g. Dateformat)
Returns:
the object of a certain type.

convert

public static <T> T convert(java.lang.Object from,
                            java.lang.Class<? extends T> to)

parseArrayElement

public static java.lang.String[] parseArrayElement(java.lang.String src)
Parameters:
src - e.g test[1][3]
Returns:
[test,1,2]

formatISO

public static java.lang.String formatISO(java.util.Date date)

ISO

public static java.text.SimpleDateFormat ISO()

main

public static void main(java.lang.String[] args)
                 throws java.text.ParseException
Throws:
java.text.ParseException

OMS (v3.0.25)

Generated 2010-08-11 08:44:20 MDT, USDA-ARS-ASRU/CSU, 2150 Center Ave, Fort Collins, CO 80526, U.S.A.