Top Description Constructors Methods
org.springframework.format.number

public Class PercentStyleFormatter

extends AbstractNumberFormatter
Class Inheritance
Imports
java.text.DecimalFormat, .NumberFormat, java.util.Locale

A formatter for number values in percent style.

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

Authors
Keith Donald, Juergen Hoeller
Since
4.2
See Also
setLenient

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected NumberFormat
getNumberFormat(Locale
the current locale
locale
)

Implements abstract org.springframework.format.number.AbstractNumberFormatter.getNumberFormat.

Obtain a concrete NumberFormat for the specified locale.

Inherited from org.springframework.format.number.AbstractNumberFormatter:
parseprintsetLenient

Constructor Detail

PercentStyleFormatterback to summary
public PercentStyleFormatter()

Method Detail

getNumberFormatback to summary
protected NumberFormat getNumberFormat(Locale locale)

Implements abstract org.springframework.format.number.AbstractNumberFormatter.getNumberFormat.

Doc from org.springframework.format.number.AbstractNumberFormatter.getNumberFormat.

Obtain a concrete NumberFormat for the specified locale.

Parameters
locale:Locale

the current locale

Returns:NumberFormat

the NumberFormat instance (never null)

Annotations
@Override