public class NumberStringConverter extends StringConverter<Number>
StringConverter implementation for Number values.
| Constructor and Description |
|---|
NumberStringConverter() |
NumberStringConverter(Locale locale) |
NumberStringConverter(Locale locale,
String pattern) |
NumberStringConverter(NumberFormat numberFormat) |
NumberStringConverter(String pattern) |
| Modifier and Type | Method and Description |
|---|---|
Number |
fromString(String value)
Converts the string provided into an object defined by the specific converter.
|
protected NumberFormat |
getNumberFormat()
Return a
NumberFormat instance to use for formatting
and parsing in this StringConverter. |
String |
toString(Number value)
Converts the object provided into its string form.
|
public NumberStringConverter()
public NumberStringConverter(Locale locale)
public NumberStringConverter(String pattern)
public NumberStringConverter(NumberFormat numberFormat)
public Number fromString(String value)
fromString in class StringConverter<Number>public String toString(Number value)
toString in class StringConverter<Number>protected NumberFormat getNumberFormat()
Return a NumberFormat instance to use for formatting
and parsing in this StringConverter.
Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.