Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD

## org.grails.databinding.converters.web
[Groovy] Class LocaleAwareNumberConverter

    java.lang.Object
      org.grails.databinding.converters.web.LocaleAwareNumberConverter

All Implemented Interfaces:
  ValueConverter

    @groovy.transform.CompileStatic
    class LocaleAwareNumberConverter
    extends java.lang.Object

A ValueConverter that knows how to convert a String to any numeric type and is Locale aware. The converter will use the Locale of the current request if being invoked as part of a request, otherwise will use Locale.getDefault()

Authors:
  Jeff Brown

Since:
  2.3

Property Summary
`org.springframework.web.servlet.LocaleResolver` | `localeResolver`
`java.lang.Class` | `targetType`

Method Summary
`boolean` | `canConvert(java.lang.Object value)`
`java.lang.Object` | `convert(java.lang.Object value)`
`protected java.util.Locale` | `getLocale()`
`protected java.text.NumberFormat` | `getNumberFormatter()`

Methods inherited from class java.lang.Object
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()

Property Detail

### localeResolver

    @org.springframework.beans.factory.annotation.Autowired(required=false)
    org.springframework.web.servlet.LocaleResolver localeResolver

### targetType

    java.lang.Class targetType

Method Detail

### canConvert

    @java.lang.Override
    boolean canConvert(java.lang.Object value)

### convert

    @java.lang.Override
    java.lang.Object convert(java.lang.Object value)

### getLocale

    protected java.util.Locale getLocale()

### getNumberFormatter

    protected java.text.NumberFormat getNumberFormatter()

Groovy Documentation