|
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 |
java.lang.Objectorg.hyperic.hq.measurement.UnitsConvert
public class UnitsConvert
Method Summary | |
---|---|
static FormattedNumber |
convert(double val,
java.lang.String units)
|
static FormattedNumber |
convert(double val,
java.lang.String units,
FormatSpecifics specifics)
Convert the value into a string based on the specified units. |
static FormattedNumber |
convert(double val,
java.lang.String units,
java.util.Locale locale)
Convert the value into a string based on the specified units. |
static FormattedNumber |
convert(double val,
java.lang.String units,
java.util.Locale locale,
FormatSpecifics specifics)
Convert the value into a string based on the specified units. |
static FormattedNumber[] |
convertSame(double[] vals,
java.lang.String units,
java.util.Locale locale)
Format multiple values into approximated values, all of which use the same unit. |
static FormattedNumber[] |
convertSame(double[] vals,
java.lang.String units,
java.util.Locale locale,
FormatSpecifics specifics)
|
static int |
getScaleForUnit(java.lang.String unit)
Return the corresponding scale constant from UnitsConstants for the given unit. |
static int |
getUnitForUnit(java.lang.String unit)
Return the corresponding unit constant from UnitsConstants for the given unit. |
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static int getUnitForUnit(java.lang.String unit)
UnitsConstants
for the given unit.
unit
- the unit
UnitsConstants
unitUnitsConstants
public static int getScaleForUnit(java.lang.String unit)
UnitsConstants
for the given unit.
unit
- the unit
UnitsConstants
scaleUnitsConstants
public static FormattedNumber convert(double val, java.lang.String units)
public static FormattedNumber convert(double val, java.lang.String units, java.util.Locale locale)
val
- Value to renderunits
- One of MeasurementConstants.UNITS_*locale
- The locale to use when rendering the result
public static FormattedNumber convert(double val, java.lang.String units, FormatSpecifics specifics)
val
- Value to renderunits
- One of MeasurementConstants.UNITS_*specifics
- config object for formatting specifics
public static FormattedNumber convert(double val, java.lang.String units, java.util.Locale locale, FormatSpecifics specifics)
val
- Value to renderunits
- One of MeasurementConstants.UNITS_*locale
- The locale to use when rendering the resultspecifics
- config object for formatting specifics
public static FormattedNumber[] convertSame(double[] vals, java.lang.String units, java.util.Locale locale)
vals
- Values to renderunits
- One of MeasurementConstants.UNITS_*locale
- The locale to use when rendering the result
public static FormattedNumber[] convertSame(double[] vals, java.lang.String units, java.util.Locale locale, FormatSpecifics specifics)
public static void main(java.lang.String[] args)
|
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 |