org.springframework.binding.format
Class DefaultNumberFormatFactory

java.lang.Object
  extended by org.springframework.binding.format.AbstractNumberFormatFactory
      extended by org.springframework.binding.format.DefaultNumberFormatFactory
All Implemented Interfaces:
NumberFormatFactory

public class DefaultNumberFormatFactory
extends AbstractNumberFormatFactory

Works with a general purpose DecimalFormat instance returned by calling NumberFormat.getInstance(Locale) by default. This instance supports parsing any number type generally and will not perform special type-specific logic such as rounding or truncation.

Author:
Keith Donald
See Also:
NumberFormat, DecimalFormat

Constructor Summary
DefaultNumberFormatFactory()
           
 
Method Summary
 String getPattern()
          The pattern to use to format number values.
 void setPattern(String pattern)
          Sets the pattern for formatting numbers.
 
Methods inherited from class org.springframework.binding.format.AbstractNumberFormatFactory
getLocale, getNumberFormat, setLocale
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultNumberFormatFactory

public DefaultNumberFormatFactory()
Method Detail

getPattern

public String getPattern()
The pattern to use to format number values. If not specified, the default DecimalFormat pattern is used.

Returns:
the date formatting pattern

setPattern

public void setPattern(String pattern)
Sets the pattern for formatting numbers.

Parameters:
pattern - the format pattern
See Also:
DecimalFormat