org.springframework.ui.format.number
Class IntegerFormatter

java.lang.Object
  extended by org.springframework.ui.format.number.AbstractNumberFormatter
      extended by org.springframework.ui.format.number.IntegerFormatter
All Implemented Interfaces:
Formatter<Number>

public final class IntegerFormatter
extends AbstractNumberFormatter

A Number formatter for whole integer values.

Delegates to NumberFormat.getIntegerInstance(Locale). The AbstractNumberFormatter.parse(String, Locale) routine always returns a Long.

Since:
3.0
Author:
Keith Donald, Juergen Hoeller
See Also:
AbstractNumberFormatter.setLenient(boolean)

Constructor Summary
IntegerFormatter()
           
 
Method Summary
protected  NumberFormat getNumberFormat(Locale locale)
          Obtain a concrete NumberFormat for the specified locale.
 
Methods inherited from class org.springframework.ui.format.number.AbstractNumberFormatter
format, parse, setLenient
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntegerFormatter

public IntegerFormatter()
Method Detail

getNumberFormat

protected NumberFormat getNumberFormat(Locale locale)
Description copied from class: AbstractNumberFormatter
Obtain a concrete NumberFormat for the specified locale.

Specified by:
getNumberFormat in class AbstractNumberFormatter
Parameters:
locale - the current locale
Returns:
the NumberFormat instance (never null)