public class PercentageFormatter extends SimpleFormatter
| Constructor and Description |
|---|
PercentageFormatter() |
| Modifier and Type | Method and Description |
|---|---|
protected FormattedNumber |
formatNumber(double rawValue,
NumberFormat fmt) |
FormattedNumber[] |
formatSame(double[] vals,
UnitsConstants unitType,
ScaleConstants scale,
Locale locale,
FormatSpecifics specifics)
Format a several values at once into the same format.
|
protected ScaleConstants |
getUnitScale() |
protected UnitsConstants |
getUnitType() |
UnitNumber |
parse(String val,
Locale locale,
ParseSpecifics specifics)
Parse a string into a UnitNumber.
|
format, getBaseValue, getNumberFormat, getScaledValueprotected UnitsConstants getUnitType()
getUnitType in class SimpleFormatterprotected ScaleConstants getUnitScale()
getUnitScale in class SimpleFormatterprotected FormattedNumber formatNumber(double rawValue, NumberFormat fmt)
formatNumber in class SimpleFormatterpublic UnitNumber parse(String val, Locale locale, ParseSpecifics specifics) throws ParseException
Formatterparse in interface Formatterparse in class SimpleFormatterval - Value to parselocale - Locale to parse withspecifics - An optional argument which gives the parser more information about parsingParseException - if the value could not be parsedpublic FormattedNumber[] formatSame(double[] vals, UnitsConstants unitType, ScaleConstants scale, Locale locale, FormatSpecifics specifics)
FormatterformatSame in interface FormatterformatSame in class SimpleFormattervals - Values to formatunitType - One of UnitsConstants.UNIT_*scale - One of UnitsConstants.SCALE_*locale - Locale that the resultant format should be inspecifics - Optional format to give specific hints to the formatter about how the result should look.Copyright © 2008-2013 Red Hat, Inc.. All Rights Reserved.