K
- The type of the keyspublic interface TypeCoercingMap<K> extends Map<K,String>
Modifier and Type | Method and Description |
---|---|
Boolean |
asBool(K key)
Convert the value with given key to a Boolean, using
Boolean.valueOf(String) . |
Byte |
asByte(K key)
Convert the value with given key to a Byte, using
Byte.valueOf(String) . |
Integer |
asInt(K key)
Convert the value with given key to a Integer, using
Integer.valueOf(String) . |
Long |
asLong(K key)
Convert the value with given key to a Long, using
Long.valueOf(String) . |
Short |
asShort(K key)
Convert the value with given key to a Short, using
Short.valueOf(String) . |
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
Boolean asBool(K key)
Boolean.valueOf(String)
.key
- The key of the value to convertBoolean.valueOf(String)
if the value is not null, else nullByte asByte(K key)
Byte.valueOf(String)
.key
- The key of the value to convertByte.valueOf(String)
if the value is not null, else nullShort asShort(K key) throws NumberFormatException
Short.valueOf(String)
.key
- The key of the value to convertShort.valueOf(String)
if the value is not null, else nullNumberFormatException
- if the value cannot be coercedInteger asInt(K key) throws NumberFormatException
Integer.valueOf(String)
.key
- The key of the value to convertInteger.valueOf(String)
if the value is not null, else nullNumberFormatException
- if the value cannot be coercedLong asLong(K key) throws NumberFormatException
Long.valueOf(String)
.key
- The key of the value to convertLong.valueOf(String)
if the value is not null, else nullNumberFormatException
- if the value cannot be coerced