Hyperic HQ Plugin API v. 4.4.0.2

org.hyperic.util.units
Class CurrencyFormatter

java.lang.Object
  extended by org.hyperic.util.units.SimpleFormatter
      extended by org.hyperic.util.units.CurrencyFormatter
All Implemented Interfaces:
Formatter

public class CurrencyFormatter
extends SimpleFormatter

Formatter for converting cents to dollars. XXX: Use locale to make this more generic?


Constructor Summary
CurrencyFormatter()
           
 
Method Summary
protected  FormattedNumber formatNumber(double rawValue, java.text.NumberFormat fmt)
           
protected  java.text.NumberFormat getNumberFormat(java.util.Locale locale)
           
protected  java.lang.String getTagName()
           
protected  int getUnitScale()
           
protected  int getUnitType()
           
 
Methods inherited from class org.hyperic.util.units.SimpleFormatter
format, formatSame, getBaseValue, getScaledValue, parse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CurrencyFormatter

public CurrencyFormatter()
Method Detail

getTagName

protected java.lang.String getTagName()

getUnitType

protected int getUnitType()
Specified by:
getUnitType in class SimpleFormatter

getUnitScale

protected int getUnitScale()
Specified by:
getUnitScale in class SimpleFormatter

getNumberFormat

protected java.text.NumberFormat getNumberFormat(java.util.Locale locale)
Overrides:
getNumberFormat in class SimpleFormatter

formatNumber

protected FormattedNumber formatNumber(double rawValue,
                                       java.text.NumberFormat fmt)
Specified by:
formatNumber in class SimpleFormatter

Hyperic HQ Plugin API v. 4.4.0.2

Copyright © 2004-2006 Hyperic, Inc. support@hyperic.net, All Rights Reserved.