public abstract class AbstractValueMap extends Object implements ValueMap
ValueMap
base class.Constructor and Description |
---|
AbstractValueMap() |
Modifier and Type | Method and Description |
---|---|
<T> T |
get(String name,
Class<T> type)
Get a named property and convert it into the given type.
|
<T> T |
get(String name,
T defaultValue)
Get a named property and convert it into the given type.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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
public final <T> T get(String name, Class<T> type)
ValueMap
public final <T> T get(String name, T defaultValue)
ValueMap
get
in interface ValueMap
T
- value typename
- The name of the propertydefaultValue
- The default value to use if the named property does not exist or cannot be converted
to the requested type. The default value is also used to define the type to convert the value to.
If this is null any existing property is not converted.Copyright © 2017–2020 Hippo B.V. (http://www.onehippo.com). All rights reserved.