net.sf.japaki.kit
Class DateParserMold

java.lang.Object
  extended by net.sf.japaki.kit.LeafParserMold<Date>
      extended by net.sf.japaki.kit.DateParserMold
All Implemented Interfaces:
ParserMold<Date>

public class DateParserMold
extends LeafParserMold<Date>

Parser mold based on a SimpleDateFormat.


Nested Class Summary
 
Nested classes/interfaces inherited from interface net.sf.japaki.kit.ParserMold
ParserMold.Parameter
 
Constructor Summary
protected DateParserMold()
          Creates a new date parser mold for the default locale.
  DateParserMold(DateFormatSymbols formatSymbols)
          Creates a new date parser mold.
  DateParserMold(Locale locale)
          Creates a new date parser mold.
 
Method Summary
protected  Format getFormat(String pattern)
          Returns the format of the parser to be created.
static DateParserMold getInstance()
          Returns an instance of this class for the default locale.
 
Methods inherited from class net.sf.japaki.kit.LeafParserMold
getErrorMessage, getFormat, getName, getParser, getTargetType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateParserMold

public DateParserMold(DateFormatSymbols formatSymbols)
Creates a new date parser mold.

Parameters:
formatSymbols - see SimpleDateFormat
Throws:
NullPointerException - if formatSymbols is null

DateParserMold

public DateParserMold(Locale locale)
Creates a new date parser mold.

Parameters:
locale - see SimpleDateFormat
Throws:
NullPointerException - if locale is null

DateParserMold

protected DateParserMold()
Creates a new date parser mold for the default locale.

Method Detail

getInstance

public static final DateParserMold getInstance()
Returns an instance of this class for the default locale.

Returns:
the default instance for this class

getFormat

protected Format getFormat(String pattern)
Description copied from class: LeafParserMold
Returns the format of the parser to be created.

Specified by:
getFormat in class LeafParserMold<Date>
Parameters:
pattern - the pattern describing the format
Returns:
format of the parser to be created
Throws:
NullPointerException - if the given pattern is null
IllegalArgumentException - if the given pattern is invalid