Class SimpleMetaDataMap
- All Implemented Interfaces:
MetaDataMap,Serializable,Cloneable,Map<String,Object>
A simple value map implementation, with limited conversion capabilities
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesMethods inherited from class java.util.AbstractMap
equals, hashCode, toStringMethods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Constructor Details
-
SimpleMetaDataMap
public SimpleMetaDataMap()
-
-
Method Details
-
get
Supports automatic meta data conversion based on the given type.- Specified by:
getin interfaceMetaDataMap- Type Parameters:
T- the type of the class- Parameters:
name- The name of the meta data propertytype- The class of the type to use for conversion.- Returns:
- The value of the property converted to type T or
nullif there is no such property or it cannot be converted to the given type. - See Also:
-
get
Supports automatic meta data conversion, based on the type of the default value.- Specified by:
getin interfaceMetaDataMap- Type Parameters:
T- the type of the class- Parameters:
name- The name of the meta data propertydefaultValue- A default value to use in case the property does not exist or cannot be converted. The type to convert to is determined by the type of the default value. If the default value isnulland a property for the given name exists, it is returned without conversion.- Returns:
- The value of the property converted to type T or
nullif there is no such property or it cannot be converted to the given type. - See Also:
-