AbstractTypeConvertingMap (Grails 5.2.3)

Package: grails.util

## [Java] Class AbstractTypeConvertingMap

- grails.util.AbstractTypeConvertingMap

- All Implemented Interfaces and Traits:
    java.util.Map, java.lang.Cloneable

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

  AbstractTypeConvertingMap is a Map with 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

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `protected java.util.Map` | `wrappedMap` |

  - ### Constructor Summary

    Constructors
    Constructor and description
    `AbstractTypeConvertingMap ()`
    `AbstractTypeConvertingMap (java.util.Map map)`

  - ### Methods Summary

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

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class groovy.lang.GroovyObjectSupport` | `groovy.lang.GroovyObjectSupport#getMetaClass(), groovy.lang.GroovyObjectSupport#setMetaClass(groovy.lang.MetaClass), 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(), 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)`

- - ### Field Detail

    - #### protected java.util.Map wrappedMap

  - ### Constructor Detail

    - #### public AbstractTypeConvertingMap()

    - #### public AbstractTypeConvertingMap(java.util.Map map)

  - ### Method Detail

    - #### public boolean asBoolean()

    - #### public void clear()

    - #### public boolean containsKey(java.lang.Object k)

    - #### public boolean containsValue(java.lang.Object v)

    - #### 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

    - #### 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

    - #### public java.util.Date date(java.lang.String name, java.util.Collection<java.lang.String> 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

    - #### public java.util.Set entrySet()

    - #### public boolean equals(java.util.Map that)

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

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

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

      Helper method for obtaining boolean value from parameter

      Parameters:
        `name` - The name of the parameter
      Returns:
        The boolean value or null if there isn't one

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

    - #### 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

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

    - #### 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

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

    - #### 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 DEFAULT_DATE_FORMAT) or null

    - #### 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

    - #### 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

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

    - #### 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

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

    - #### 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

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

    - #### 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

    - #### 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

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

    - #### 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

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

    - #### @java.lang.Override public int hashCode()

    - #### public boolean isEmpty()

    - #### public java.util.Set keySet()

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

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

    - #### public void putAll(java.util.Map m)

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

    - #### public int size()

    - #### @java.lang.Override public java.lang.String toString()

    - #### public java.util.Collection values()