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.
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 2008, 2019, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.