Holger's Java API

## com.antelmann.util.gui
Class PercentFormat

    java.lang.Object
      java.text.Format
          java.text.NumberFormat
              com.antelmann.util.gui.PercentFormat

All Implemented Interfaces:
  Serializable, Cloneable

    public class PercentFormat

extends NumberFormat

allows to edit percentages in a commonly used way, so that the number 10 actually represents 10 percent.

Since:
  12. September 2007, 21:37
Author:
  Holger Antelmann
See Also:
  `NumberFormat.getPercentInstance()`, Serialized Form

Nested Class Summary

Nested classes/interfaces inherited from class java.text.NumberFormat
`NumberFormat.Field`

Field Summary

Fields inherited from class java.text.NumberFormat
`FRACTION_FIELD, INTEGER_FIELD`

Constructor Summary
`PercentFormat()`
`PercentFormat(Locale l)`

Method Summary
`StringBuffer` `format(double number, StringBuffer toAppendTo, FieldPosition pos)`
`StringBuffer` `format(long number, StringBuffer toAppendTo, FieldPosition pos)`
`Number` `parse(String source, ParsePosition parsePosition)`

Methods inherited from class java.text.NumberFormat

`clone, equals, format, format, format, getAvailableLocales, getCurrency, getCurrencyInstance, getCurrencyInstance, getInstance, getInstance, getIntegerInstance, getIntegerInstance, getMaximumFractionDigits, getMaximumIntegerDigits, getMinimumFractionDigits, getMinimumIntegerDigits, getNumberInstance, getNumberInstance, getPercentInstance, getPercentInstance, getRoundingMode, hashCode, isGroupingUsed, isParseIntegerOnly, parse, parseObject, setCurrency, setGroupingUsed, setMaximumFractionDigits, setMaximumIntegerDigits, setMinimumFractionDigits, setMinimumIntegerDigits, setParseIntegerOnly, setRoundingMode`

Methods inherited from class java.text.Format
`format, formatToCharacterIterator, parseObject`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PercentFormat

    public PercentFormat()

### PercentFormat

    public PercentFormat(Locale l)

Method Detail

### format

    public StringBuffer format(double number,
                               StringBuffer toAppendTo,
                               FieldPosition pos)

  Specified by:
    `format` in class `NumberFormat`

### format

    public StringBuffer format(long number,
                               StringBuffer toAppendTo,
                               FieldPosition pos)

  Specified by:
    `format` in class `NumberFormat`

### parse

    public Number parse(String source,
                        ParsePosition parsePosition)

  Specified by:
    `parse` in class `NumberFormat`

(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads