|
Hyperic HQ Plugin API v. 4.4.0.2 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Formatter
| Method Summary | |
|---|---|
FormattedNumber |
format(UnitNumber val,
java.util.Locale locale,
FormatSpecifics format)
Format a number with the given locale. |
FormattedNumber[] |
formatSame(double[] values,
int unitType,
int scale,
java.util.Locale locale,
FormatSpecifics format)
Format a several values at once into the same format. |
java.math.BigDecimal |
getBaseValue(double value,
int scale)
Get the base value of a value, given its scale. |
java.math.BigDecimal |
getScaledValue(java.math.BigDecimal value,
int targScale)
Get a scaled version of a value. |
UnitNumber |
parse(java.lang.String val,
java.util.Locale locale,
ParseSpecifics specifics)
Parse a string into a UnitNumber. |
| Method Detail |
|---|
FormattedNumber format(UnitNumber val,
java.util.Locale locale,
FormatSpecifics format)
val - Value to formatlocale - Locale that the resultant format should be informat - Optional format to give specific hints to the
formatter about how the result should look.
FormattedNumber[] formatSame(double[] values,
int unitType,
int scale,
java.util.Locale locale,
FormatSpecifics format)
values - Values to formatunitType - One of UnitsConstants.UNIT_*scale - One of UnitsConstants.SCALE_*locale - Locale that the resultant format should be informat - Optional format to give specific hints to the
formatter about how the result should look.
java.math.BigDecimal getBaseValue(double value,
int scale)
value - Value to get the base ofscale - Scale of the value -- must be valid for the
formatter unit type
java.math.BigDecimal getScaledValue(java.math.BigDecimal value,
int targScale)
value - Value to scaletargScale - Target scale -- must be valid for the
formatter unit type
UnitNumber parse(java.lang.String val,
java.util.Locale locale,
ParseSpecifics specifics)
throws java.text.ParseException
val - Value to parselocale - Locale to parse withspecifics - An optional argument which gives the parser
more information about parsing
java.text.ParseException
|
Hyperic HQ Plugin API v. 4.4.0.2 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||