public class

PercentFormatter

extends AbstractNumberFormatter
java.lang.Object
   ↳ org.springframework.format.number.AbstractNumberFormatter
     ↳ org.springframework.format.number.PercentFormatter

Class Overview

A Number formatter for percent values.

Delegates to getPercentInstance(Locale). Configures BigDecimal parsing so there is no loss in precision. The parse(String, Locale) routine always returns a BigDecimal.

Summary

Public Constructors
PercentFormatter()
Protected Methods
NumberFormat getNumberFormat(Locale locale)
Obtain a concrete NumberFormat for the specified locale.
[Expand]
Inherited Methods
From class org.springframework.format.number.AbstractNumberFormatter
From class java.lang.Object
From interface org.springframework.format.Parser
From interface org.springframework.format.Printer

Public Constructors

public PercentFormatter ()

Protected Methods

protected NumberFormat getNumberFormat (Locale locale)

Obtain a concrete NumberFormat for the specified locale.

Parameters
locale the current locale
Returns
  • the NumberFormat instance (never null)