LazyBeanMap (Grails 5.1.1)

Package: grails.beans.util

## [Groovy] Class LazyBeanMap

- grails.beans.util.LazyBeanMap

- All Implemented Interfaces and Traits:
    java.util.Map<java.lang.String, java.lang.Object>

      @groovy.transform.CompileStatic
      class LazyBeanMap
      extends java.lang.Object
      implements java.util.Map<java.lang.String, java.lang.Object>

  A map that backs onto a bean. The map is not initialized from the beans property values on creation, but instead lazily reads the values on demand. No caching is applied, so each read results in a reflective call to retrieve the property. Users of this API should apply their own caching strategy if necessary.

  Note that the java.util.Map#values() and java.util.Map#entrySet() implementations are expensive operations as they will read all properties of the target bean and should be used with caution.

  Additionally the Map#remove(java.lang.Object) and java.util.Map#clear() methods are not implemented and will throw java.lang.UnsupportedOperationException.

  deprecated:
    use LazyMetaPropertyMap instead
  Since:
    2.4
  Authors:
    Graeme Rocher

- - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `java.lang.Object` | `target`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `LazyBeanMap (java.lang.Object target)` Creates a bean map

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `void` | `clear()`
    `` | `boolean` | `containsKey(java.lang.Object key)`
    `` | `boolean` | `containsValue(java.lang.Object value)`
    `` | `java.util.Set<Map.Entry<java.lang.String, java.lang.Object>>` | `entrySet()`
    `` | `java.lang.Object` | `get(java.lang.Object key)`
    `` | `boolean` | `isEmpty()`
    `` | `java.util.Set<java.lang.String>` | `keySet()`
    `` | `java.lang.Object` | `put(java.lang.String key, java.lang.Object value)`
    `` | `void` | `putAll(java.util.Map<? extends java.lang.String, ?> m)`
    `` | `java.lang.Object` | `remove(java.lang.Object key)`
    `` | `int` | `size()`
    `` | `java.util.Collection<java.lang.Object>` | `values()`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `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

    - #### final java.lang.Object target

  - ### Constructor Detail

    - #### LazyBeanMap(java.lang.Object target)

      Creates a bean map

      Parameters:
        `target` - The target bean

  - ### Method Detail

    - #### @java.lang.Override void clear()

    - #### @java.lang.Override boolean containsKey(java.lang.Object key)

    - #### @java.lang.Override boolean containsValue(java.lang.Object value)

    - #### @java.lang.Override java.util.Set<Map.Entry<java.lang.String, java.lang.Object>> entrySet()

    - #### @java.lang.Override java.lang.Object get(java.lang.Object key)

    - #### @java.lang.Override boolean isEmpty()

    - #### @java.lang.Override java.util.Set<java.lang.String> keySet()

    - #### @java.lang.Override java.lang.Object put(java.lang.String key, java.lang.Object value)

    - #### @java.lang.Override void putAll(java.util.Map<? extends java.lang.String, ?> m)

    - #### @java.lang.Override java.lang.Object remove(java.lang.Object key)

    - #### @java.lang.Override int size()

    - #### @java.lang.Override java.util.Collection<java.lang.Object> values()