Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Web Flow
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.binding.format
Class AbstractNumberFormatFactory

    java.lang.Object
      org.springframework.binding.format.AbstractNumberFormatFactory

All Implemented Interfaces:
  NumberFormatFactory

Direct Known Subclasses:
  CurrencyNumberFormatFactory, DefaultNumberFormatFactory, IntegerNumberFormatFactory, PercentNumberFormatFactory

    public abstract class AbstractNumberFormatFactory

extends java.lang.Object
implements NumberFormatFactory

Base class suitable for subclassing by most `NumberFormatFactory` implementations.

Author:
  Keith Donald

Constructor Summary
`AbstractNumberFormatFactory()`

Method Summary
`java.util.Locale` | `getLocale()` The locale to use in formatting number values.
`java.text.NumberFormat` | `getNumberFormat()` Factory method that returns a fully-configured `NumberFormat` instance to use to format an object for display.
`protected abstract java.text.NumberFormat` | `getNumberFormat(java.util.Locale locale)` Subclasses should override to create the new NumberFormat instance.
`void` | `setLocale(java.util.Locale locale)` Sets the locale to use in formatting number values.

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

Constructor Detail

### AbstractNumberFormatFactory

    public AbstractNumberFormatFactory()

Method Detail

### getLocale

    public java.util.Locale getLocale()

  The locale to use in formatting number values. If null, the locale associated with the current thread is used.

  Returns:
    the locale
  See Also:
    `LocaleContextHolder.getLocale()`

### setLocale

    public void setLocale(java.util.Locale locale)

  Sets the locale to use in formatting number values.

  Parameters:
    `locale` - the locale

### getNumberFormat

    public final java.text.NumberFormat getNumberFormat()

  Description copied from interface: `NumberFormatFactory`
  Factory method that returns a fully-configured `NumberFormat` instance to use to format an object for display.

  Specified by:
    `getNumberFormat` in interface `NumberFormatFactory`
  Returns:
    the number format

### getNumberFormat

    protected abstract java.text.NumberFormat getNumberFormat(java.util.Locale locale)

  Subclasses should override to create the new NumberFormat instance.

  Parameters:
    `locale` - the locale to use
  Returns:
    the number format

Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Web Flow
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD