Groovy Documentation

## org.codehaus.groovy.grails.commons.metaclass
[Java] Class LazyMetaPropertyMap

    java.lang.Object
      org.codehaus.groovy.grails.commons.metaclass.LazyMetaPropertyMap

All Implemented Interfaces:
  java.util.Map

    @SuppressWarnings({"unchecked","rawtypes"})
    public class LazyMetaPropertyMap

A map implementation that reads an objects properties lazily using Groovy's MetaClass.

Authors:
  Graeme Rocher

Constructor Summary
`LazyMetaPropertyMap(java.lang.Object o)` Constructs the map

Method Summary
`void` | `clear()` @throws UnsupportedOperationException
`boolean` | `containsKey(java.lang.Object propertyName)` {@inheritDoc}
`boolean` | `containsValue(java.lang.Object o)` Checks whether the specified value is contained within the Map.
`java.util.Set` | `entrySet()`
`boolean` | `equals(java.lang.Object o)`
`java.lang.Object` | `get(java.lang.Object propertyName)` Obtains the value of an object's properties on demand using Groovy's MOP.
`java.lang.Object` | `getInstance()` Returns the wrapped instance.
`int` | `hashCode()`
`boolean` | `isEmpty()` {@inheritDoc}
`java.util.Set` | `keySet()`
`java.lang.Object` | `put(java.lang.Object propertyName, java.lang.Object propertyValue)`
`void` | `putAll(java.util.Map map)`
`java.lang.Object` | `remove(java.lang.Object o)` @throws UnsupportedOperationException
`int` | `size()` {@inheritDoc}
`java.util.Collection` | `values()`

Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), 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()

Constructor Detail

### LazyMetaPropertyMap

    public LazyMetaPropertyMap(java.lang.Object o)

  Constructs the map
  Parameters:
    `o` - The object to inspect

Method Detail

### clear

    public void clear()

  throws:
    UnsupportedOperationException

### containsKey

    public boolean containsKey(java.lang.Object propertyName)

  {@inheritDoc}
  See Also:
    java.util.Map#containsKey(java.lang.Object)

### containsValue

    public boolean containsValue(java.lang.Object o)

  Checks whether the specified value is contained within the Map. Note that because this implementation lazily initialises property values the behaviour may not be consistent with the actual values of the contained object unless they have already been initialised by calling get(Object)
  See Also:
    java.util.Map#containsValue(Object)

### entrySet

    public java.util.Set entrySet()

### equals

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

### get

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

  Obtains the value of an object's properties on demand using Groovy's MOP.
  Parameters:
    `propertyName` - The name of the property
  Returns:
    The property value or null

### getInstance

    public java.lang.Object getInstance()

  Returns the wrapped instance.
  Returns:
    The wrapped instance

### hashCode

    @Override
    public int hashCode()

### isEmpty

    public boolean isEmpty()

  {@inheritDoc}
  See Also:
    java.util.Map#isEmpty()

### keySet

    public java.util.Set keySet()

### put

    public java.lang.Object put(java.lang.Object propertyName, java.lang.Object propertyValue)

### putAll

    public void putAll(java.util.Map map)

### remove

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

  throws:
    UnsupportedOperationException

### size

    public int size()

  {@inheritDoc}
  See Also:
    java.util.Map#size()

### values

    public java.util.Collection values()

Groovy Documentation