AbstractTypeConvertingMap (Grails 2.3.8)
Date: 2014-04-24

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

## org.codehaus.groovy.grails.web.util
[Java] Class AbstractTypeConvertingMap

    java.lang.Object
      groovy.lang.GroovyObjectSupport
          org.codehaus.groovy.grails.web.util.AbstractTypeConvertingMap

All Implemented Interfaces:
  java.util.Map, java.lang.Cloneable

    @java.lang.SuppressWarnings({ "rawtypes", "unchecked" })
    public abstract class AbstractTypeConvertingMap
    extends groovy.lang.GroovyObjectSupport

An category for use with maps that want type conversion capabilities Type converting maps have no inherent ordering. Two maps with identical entries but arranged in a different order internally are considered equal.

Authors:
  Graeme Rocher
  Lari Hotari

Since:
  1.2

Field Summary
`protected java.util.Map` | `wrappedMap`

Constructor Summary
`AbstractTypeConvertingMap()`
`AbstractTypeConvertingMap(java.util.Map map)`

Method Summary
`boolean` | `asBoolean()`
`void` | `clear()`
`boolean` | `containsKey(java.lang.Object k)`
`boolean` | `containsValue(java.lang.Object v)`
`java.util.Date` | `date(java.lang.String name)` Obtains a date for the given parameter name
`java.util.Date` | `date(java.lang.String name, java.lang.String format)` Obtains a date for the given parameter name and format
`java.util.Date` | `date(java.lang.String name, java.util.Collection formats)` Obtains a date for the given parameter name and format
`java.util.Set` | `entrySet()`
`boolean` | `equals(java.lang.Object that)`
`java.lang.Object` | `get(java.lang.Object k)`
`java.lang.Boolean` | `getBoolean(java.lang.String name)` Helper method for obtaining float value from parameter
`java.lang.Boolean` | `getBoolean(java.lang.String name, java.lang.Boolean defaultValue)`
`java.lang.Byte` | `getByte(java.lang.String name)` Helper method for obtaining integer value from parameter
`java.lang.Byte` | `getByte(java.lang.String name, java.lang.Integer defaultValue)`
`java.lang.Character` | `getChar(java.lang.String name)` Helper method for obtaining Character value from parameter
`java.lang.Character` | `getChar(java.lang.String name, java.lang.Integer defaultValue)`
`java.util.Date` | `getDate(java.lang.String name)` Obtains a date for the parameter name using the default format
`java.util.Date` | `getDate(java.lang.String name, java.lang.String format)` Obtains a date from the parameter using the given format
`java.lang.Double` | `getDouble(java.lang.String name)` Helper method for obtaining double value from parameter
`java.lang.Double` | `getDouble(java.lang.String name, java.lang.Double defaultValue)`
`java.lang.Float` | `getFloat(java.lang.String name)` Helper method for obtaining float value from parameter
`java.lang.Float` | `getFloat(java.lang.String name, java.lang.Float defaultValue)`
`java.lang.Integer` | `getInt(java.lang.String name)` Helper method for obtaining integer value from parameter
`java.lang.Integer` | `getInt(java.lang.String name, java.lang.Integer defaultValue)`
`java.util.List` | `getList(java.lang.String name)` Helper method for obtaining a list of values from parameter
`java.lang.Long` | `getLong(java.lang.String name)` Helper method for obtaining long value from parameter
`java.lang.Long` | `getLong(java.lang.String name, java.lang.Long defaultValue)`
`java.lang.Short` | `getShort(java.lang.String name)` Helper method for obtaining short value from parameter
`java.lang.Short` | `getShort(java.lang.String name, java.lang.Integer defaultValue)`
`int` | `hashCode()`
`boolean` | `isEmpty()`
`java.util.Set` | `keySet()`
`java.util.List` | `list(java.lang.String name)`
`java.lang.Object` | `put(java.lang.Object k, java.lang.Object v)`
`void` | `putAll(java.util.Map m)`
`java.lang.Object` | `remove(java.lang.Object o)`
`int` | `size()`
`java.lang.String` | `toString()`
`java.util.Collection` | `values()`

Methods inherited from class groovy.lang.GroovyObjectSupport
groovy.lang.GroovyObjectSupport#getMetaClass(), groovy.lang.GroovyObjectSupport#setMetaClass(groovy.lang.MetaClass), groovy.lang.GroovyObjectSupport#invokeMethod(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#setProperty(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#getProperty(java.lang.String), groovy.lang.GroovyObjectSupport#wait(long, int), groovy.lang.GroovyObjectSupport#wait(long), groovy.lang.GroovyObjectSupport#wait(), groovy.lang.GroovyObjectSupport#equals(java.lang.Object), groovy.lang.GroovyObjectSupport#toString(), groovy.lang.GroovyObjectSupport#hashCode(), groovy.lang.GroovyObjectSupport#getClass(), groovy.lang.GroovyObjectSupport#notify(), groovy.lang.GroovyObjectSupport#notifyAll()

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()

Field Detail

### wrappedMap

    protected java.util.Map wrappedMap

Constructor Detail

### AbstractTypeConvertingMap

    public AbstractTypeConvertingMap()

### AbstractTypeConvertingMap

    public AbstractTypeConvertingMap(java.util.Map map)

Method Detail

### asBoolean

    public boolean asBoolean()

### clear

    public void clear()

### containsKey

    public boolean containsKey(java.lang.Object k)

### containsValue

    public boolean containsValue(java.lang.Object v)

### date

    public java.util.Date date(java.lang.String name)

  Obtains a date for the given parameter name
  Parameters:
    `name` - The name of the parameter
  Returns:
    The date object or null if it cannot be parsed

### date

    public java.util.Date date(java.lang.String name, java.lang.String format)

  Obtains a date for the given parameter name and format
  Parameters:
    `name` - The name of the parameter
    `format` - The format
  Returns:
    The date object or null if it cannot be parsed

### date

    public java.util.Date date(java.lang.String name, java.util.Collection formats)

  Obtains a date for the given parameter name and format
  Parameters:
    `name` - The name of the parameter
    `formats` - The formats
  Returns:
    The date object or null if it cannot be parsed

### entrySet

    public java.util.Set entrySet()

### equals

    @java.lang.Override
    public boolean equals(java.lang.Object that)

### get

    public java.lang.Object get(java.lang.Object k)

### getBoolean

    public java.lang.Boolean getBoolean(java.lang.String name)

  Helper method for obtaining float value from parameter
  Parameters:
    `name` - The name of the parameter
  Returns:
    The double value or null if there isn't one

### getBoolean

    public java.lang.Boolean getBoolean(java.lang.String name, java.lang.Boolean defaultValue)

### getByte

    public java.lang.Byte getByte(java.lang.String name)

  Helper method for obtaining integer value from parameter
  Parameters:
    `name` - The name of the parameter
  Returns:
    The integer value or null if there isn't one

### getByte

    public java.lang.Byte getByte(java.lang.String name, java.lang.Integer defaultValue)

### getChar

    public java.lang.Character getChar(java.lang.String name)

  Helper method for obtaining Character value from parameter
  Parameters:
    `name` - The name of the parameter
  Returns:
    The Character value or null if there isn't one

### getChar

    public java.lang.Character getChar(java.lang.String name, java.lang.Integer defaultValue)

### getDate

    public java.util.Date getDate(java.lang.String name)

  Obtains a date for the parameter name using the default format
  Parameters:
    name
  Returns:
    The date (in the GrailsDataBinder.DEFAULT_DATE_FORMAT) or null

### getDate

    public java.util.Date getDate(java.lang.String name, java.lang.String format)

  Obtains a date from the parameter using the given format
  Parameters:
    `name` - The name
    `format` - The format
  Returns:
    The date or null

### getDouble

    public java.lang.Double getDouble(java.lang.String name)

  Helper method for obtaining double value from parameter
  Parameters:
    `name` - The name of the parameter
  Returns:
    The double value or null if there isn't one

### getDouble

    public java.lang.Double getDouble(java.lang.String name, java.lang.Double defaultValue)

### getFloat

    public java.lang.Float getFloat(java.lang.String name)

  Helper method for obtaining float value from parameter
  Parameters:
    `name` - The name of the parameter
  Returns:
    The double value or null if there isn't one

### getFloat

    public java.lang.Float getFloat(java.lang.String name, java.lang.Float defaultValue)

### getInt

    public java.lang.Integer getInt(java.lang.String name)

  Helper method for obtaining integer value from parameter
  Parameters:
    `name` - The name of the parameter
  Returns:
    The integer value or null if there isn't one

### getInt

    public java.lang.Integer getInt(java.lang.String name, java.lang.Integer defaultValue)

### getList

    public java.util.List getList(java.lang.String name)

  Helper method for obtaining a list of values from parameter
  Parameters:
    `name` - The name of the parameter
  Returns:
    A list of values

### getLong

    public java.lang.Long getLong(java.lang.String name)

  Helper method for obtaining long value from parameter
  Parameters:
    `name` - The name of the parameter
  Returns:
    The long value or null if there isn't one

### getLong

    public java.lang.Long getLong(java.lang.String name, java.lang.Long defaultValue)

### getShort

    public java.lang.Short getShort(java.lang.String name)

  Helper method for obtaining short value from parameter
  Parameters:
    `name` - The name of the parameter
  Returns:
    The short value or null if there isn't one

### getShort

    public java.lang.Short getShort(java.lang.String name, java.lang.Integer defaultValue)

### hashCode

    @java.lang.Override
    public int hashCode()

### isEmpty

    public boolean isEmpty()

### keySet

    public java.util.Set keySet()

### list

    public java.util.List list(java.lang.String name)

### put

    public java.lang.Object put(java.lang.Object k, java.lang.Object v)

### putAll

    public void putAll(java.util.Map m)

### remove

    public java.lang.Object remove(java.lang.Object o)

### size

    public int size()

### toString

    @java.lang.Overridepublic String toString() {
    public java.lang.String toString()

### values

    public java.util.Collection values()

Groovy Documentation