net.sf.japaki.kit
Class DurationParserMold

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

public class DurationParserMold
extends LeafParserMold<Duration>

Parser mold based on a DurationFormat.


Nested Class Summary
 
Nested classes/interfaces inherited from interface net.sf.japaki.kit.ParserMold
ParserMold.Parameter
 
Constructor Summary
protected DurationParserMold()
          Creates a new duration parser mold for the default locale.
  DurationParserMold(Locale locale)
          Creates a new duration parser mold.
 
Method Summary
protected  Format getFormat(String pattern)
          Returns the format of the parser to be created.
static DurationParserMold 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

DurationParserMold

public DurationParserMold(Locale locale)
Creates a new duration parser mold.

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

DurationParserMold

protected DurationParserMold()
Creates a new duration parser mold for the default locale.

Method Detail

getInstance

public static final DurationParserMold 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<Duration>
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