public final class Parser extends Object
| Constructor and Description |
|---|
Parser() |
| Modifier and Type | Method and Description |
|---|---|
static Boolean |
asBoolean(String bool)
Takes a String Boolean and returns null or as Boolean value
|
static Date |
asDate(String date)
Takes a String Date and decodes it into a date.
|
static Long |
asLong(String number)
Takes a String Numeric and returns null or the Long value
|
static Long |
asLong(String number,
Long defaultValue)
Takes a String Numeric and returns null or the Long value
|
static String |
toISO8601DateFormat(Date date) |
static String |
toRFC1123(Date date)
Takes a Date and returns it's equivalent in RFC 1123
|
static Date |
toRFC822DateParse(String toParse)
Parses a String in RFC 822 format into a Date object
|
public static Long asLong(String number)
number - the number in string formpublic static Long asLong(String number, Long defaultValue)
number - the number in string formdefaultValue - the default value if number is nullpublic static Boolean asBoolean(String bool)
bool - the boolean in String formpublic static Date asDate(String date)
date - the date in String formpublic static String toRFC1123(Date date)
date - the date to formatpublic static Date toRFC822DateParse(String toParse)
toParse - the date to parse