net.sf.japaki.kit
Class DecimalParserMold

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

public class DecimalParserMold
extends LeafParserMold<Number>

Parser mold based on a DecimalFormat.


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

DecimalParserMold

public DecimalParserMold(DecimalFormatSymbols formatSymbols)
Creates a new decimal parser mold.

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

DecimalParserMold

public DecimalParserMold(Locale locale)
Creates a new decimal parser mold.

Parameters:
locale - the locale whose decimal format symbols should be used
Throws:
NullPointerException - if locale is null

DecimalParserMold

protected DecimalParserMold()
Creates a new decimal parser mold for the default locale.

Method Detail

getInstance

public static final DecimalParserMold 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<Number>
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