|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.stripes.validation.NumberTypeConverterSupport
public class NumberTypeConverterSupport
Provides the basic support for converting Strings to non-floating point numbers (i.e. shorts, integers, and longs).
| Constructor Summary | |
|---|---|
NumberTypeConverterSupport()
|
|
| Method Summary | |
|---|---|
Locale |
getLocale()
Returns the Locale set on the object using setLocale(). |
protected NumberFormat[] |
getNumberFormats()
Fetches one or more NumberFormat instances that can be used to parse numbers for the current locale. |
protected Number |
parse(String input,
Collection<ValidationError> errors)
Parse the input using a NumberFormatter. |
protected String |
preprocess(String input)
Pre-processes the String to give the NumberFormats a better shot at parsing the input. |
void |
setLocale(Locale locale)
Used by Stripes to tell the converter what locale the incoming text is in. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NumberTypeConverterSupport()
| Method Detail |
|---|
public void setLocale(Locale locale)
public Locale getLocale()
protected NumberFormat[] getNumberFormats()
protected Number parse(String input,
Collection<ValidationError> errors)
protected String preprocess(String input)
input - the String as input by the user
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||