Package grails.beans.util
Class LazyMetaPropertyMap
java.lang.Object
grails.beans.util.LazyMetaPropertyMap
- All Implemented Interfaces:
Map
A map implementation that reads an objects properties lazily using Groovy's MetaClass.
-
Nested Class Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleancontainsKey(Object propertyName) booleanChecks whether the specified value is contained within the Map.Set<groovy.util.MapEntry>entrySet()booleanObtains the value of an object's properties on demand using Groovy's MOP.Returns the wrapped instance.inthashCode()booleanisEmpty()keySet()voidintsize()values()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
LazyMetaPropertyMap
Constructs the map- Parameters:
o- The object to inspect
-
-
Method Details
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKeyin interfaceMap- See Also:
-
containsValue
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)- Specified by:
containsValuein interfaceMap- See Also:
-
get
Obtains the value of an object's properties on demand using Groovy's MOP. -
put
-
remove
- Specified by:
removein interfaceMap- Throws:
UnsupportedOperationException
-
putAll
-
clear
public void clear()- Specified by:
clearin interfaceMap- Throws:
UnsupportedOperationException
-
keySet
-
values
-
hashCode
public int hashCode() -
equals
-
getInstance
Returns the wrapped instance.- Returns:
- The wrapped instance
-
entrySet
-