public class NumberTypeConverterSupport
extends java.lang.Object
Constructor and Description |
---|
NumberTypeConverterSupport() |
Modifier and Type | Method and Description |
---|---|
java.util.Locale |
getLocale()
Returns the Locale set on the object using setLocale().
|
protected java.text.NumberFormat[] |
getNumberFormats()
Fetches one or more NumberFormat instances that can be used to parse numbers
for the current locale.
|
protected java.lang.Number |
parse(java.lang.String input,
java.util.Collection<ValidationError> errors)
Parse the input using a NumberFormatter.
|
protected java.lang.String |
preprocess(java.lang.String input)
Pre-processes the String to give the NumberFormats a better shot at parsing the
input.
|
void |
setLocale(java.util.Locale locale)
Used by Stripes to tell the converter what locale the incoming text is in.
|
public void setLocale(java.util.Locale locale)
public java.util.Locale getLocale()
protected java.text.NumberFormat[] getNumberFormats()
protected java.lang.Number parse(java.lang.String input, java.util.Collection<ValidationError> errors)
protected java.lang.String preprocess(java.lang.String input)
input
- the String as input by the user? Copyright 2005-2006, Stripes Development Team.