groovy.json.internal

## Class ValueMapImpl

- java.lang.Object
- - java.util.AbstractMap<String,Value>
  - - groovy.json.internal.ValueMapImpl

- All Implemented Interfaces:
    ValueMap<String,Value>, Map<String,Value>

      public class ValueMapImpl
      extends AbstractMap<String,Value>
      implements ValueMap<String,Value>

  This map is for object serialization mainly. The idea is the final conversion of the Value objects are delayed until the last possible moment, i.e., just before injected into a bean.
  Author:
    Rick Hightower

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class java.util.AbstractMap

      `AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>`

    - ### Nested classes/interfaces inherited from interface java.util.Map

      `Map.Entry<K,V>`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ValueMapImpl()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(MapItemValue miv)` Add a MapItemValue to the map.
    `Set<Map.Entry<String,Value>>` | `entrySet()` If the map has not been built yet, then we just return a fake entry set.
    `Value` | `get(Object key)` Get the items for the key.
    `boolean` | `hydrated()` Has the map been hydrated.
    `Map.Entry<String,Value>[]` | `items()` Give me the items in the map without hydrating the map.
    `int` | `len()` Return size w/o hydrating the map.
    `Value` | `put(String key, Value value)`
    `int` | `size()` Return the size of the map.
    `Collection<Value>` | `values()` Return a collection of values.

    - ### Methods inherited from class java.util.AbstractMap

      `clear, clone, containsKey, containsValue, equals, hashCode, isEmpty, keySet, putAll, remove, toString`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface java.util.Map

      `clear, containsKey, containsValue, equals, hashCode, isEmpty, keySet, putAll, remove`

- - ### Constructor Detail

    - #### ValueMapImpl

          public ValueMapImpl()

  - ### Method Detail

    - #### add

          public void add(MapItemValue miv)

      Add a MapItemValue to the map.
      Specified by:
        `add` in interface `ValueMap<String,Value>`
      Parameters:
        `miv` - map value item.

    - #### len

          public int len()

      Description copied from interface: `ValueMap`
      Return size w/o hydrating the map.
      Specified by:
        `len` in interface `ValueMap<String,Value>`

    - #### hydrated

          public boolean hydrated()

      Description copied from interface: `ValueMap`
      Has the map been hydrated.
      Specified by:
        `hydrated` in interface `ValueMap<String,Value>`

    - #### items

          public Map.Entry<String,Value>[] items()

      Description copied from interface: `ValueMap`
      Give me the items in the map without hydrating the map. Realize that the array is likely larger than the length so array items can be null.
      Specified by:
        `items` in interface `ValueMap<String,Value>`

    - #### get

          public Value get(Object key)

      Get the items for the key.
      Specified by:
        `get` in interface `Map<String,Value>`
      Overrides:
        `get` in class `AbstractMap<String,Value>`
      Parameters:
        `key` -
      Returns:
        the items for the given key

    - #### put

          public Value put(String key,
                  Value value)

      Specified by:
        `put` in interface `Map<String,Value>`
      Overrides:
        `put` in class `AbstractMap<String,Value>`

    - #### entrySet

          public Set<Map.Entry<String,Value>> entrySet()

      If the map has not been built yet, then we just return a fake entry set.
      Specified by:
        `entrySet` in interface `Map<String,Value>`
      Specified by:
        `entrySet` in class `AbstractMap<String,Value>`

    - #### values

          public Collection<Value> values()

      Return a collection of values.
      Specified by:
        `values` in interface `Map<String,Value>`
      Overrides:
        `values` in class `AbstractMap<String,Value>`

    - #### size

          public int size()

      Return the size of the map. Use the map if it has already been created.
      Specified by:
        `size` in interface `Map<String,Value>`
      Overrides:
        `size` in class `AbstractMap<String,Value>`
      Returns:
        size