Hyperic HQ Plugin API v. 4.4.0.2

org.hyperic.util.units
Class PercentFormatter

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

public class PercentFormatter
extends PercentageFormatter


Constructor Summary
PercentFormatter()
           
 
Method Summary
protected  double getMultiplier()
           
protected  int getUnitType()
           
 UnitNumber parse(java.lang.String val, java.util.Locale locale, ParseSpecifics specifics)
          Parse a string into a UnitNumber.
 
Methods inherited from class org.hyperic.util.units.PercentageFormatter
formatNumber, formatSame, getUnitScale
 
Methods inherited from class org.hyperic.util.units.SimpleFormatter
format, getBaseValue, getNumberFormat, getScaledValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PercentFormatter

public PercentFormatter()
Method Detail

getMultiplier

protected double getMultiplier()
Overrides:
getMultiplier in class PercentageFormatter

getUnitType

protected int getUnitType()
Overrides:
getUnitType in class PercentageFormatter

parse

public UnitNumber parse(java.lang.String val,
                        java.util.Locale locale,
                        ParseSpecifics specifics)
                 throws java.text.ParseException
Description copied from interface: Formatter
Parse a string into a UnitNumber. E.x. parse("34 MB") -> UnitNumber(34, UNIT_BYTES, SCALE_MEGA)

Specified by:
parse in interface Formatter
Overrides:
parse in class PercentageFormatter
Parameters:
val - Value to parse
locale - Locale to parse with
specifics - An optional argument which gives the parser more information about parsing
Returns:
the number representing the parsed value
Throws:
java.text.ParseException

Hyperic HQ Plugin API v. 4.4.0.2

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