info.informatica.lang
Class DataParser

java.lang.Object
  extended by info.informatica.lang.DataParser

public class DataParser
extends Object

Generic number and date parser.

Version:
1.00
Author:
amengual at informatica dot info

Constructor Summary
DataParser()
           
 
Method Summary
static Date parseDate(String d)
          Given a String containing a possible date or date/time, tries to parse it.
static Number parseNumber(String num)
          Given a String containing a possible number, tries to parse it to build one of the Number classes.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataParser

public DataParser()
Method Detail

parseNumber

public static Number parseNumber(String num)
Given a String containing a possible number, tries to parse it to build one of the Number classes.

Returns:
the number class that more closely matches the type of number given, or null if not parseable as a radix 10 number.

parseDate

public static Date parseDate(String d)
Given a String containing a possible date or date/time, tries to parse it.

Returns:
the number class that more closely matches the date/time String given, or null if not parseable.