V - public class DTDMap<V> extends LinkedHashMap<String,V>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| 构造器和说明 |
|---|
DTDMap()
Create a new LinkedCaseInsensitiveMap for the default Locale.
|
DTDMap(int initialCapacity)
Create a new LinkedCaseInsensitiveMap that wraps a
LinkedHashMap
with the given initial capacity and stores lower-case keys according
to the default Locale. |
DTDMap(int initialCapacity,
Locale locale)
Create a new LinkedCaseInsensitiveMap that wraps a
LinkedHashMap
with the given initial capacity and stores lower-case keys according
to the given Locale. |
DTDMap(Locale locale)
Create a new LinkedCaseInsensitiveMap that stores lower-case keys
according to the given Locale.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clear() |
boolean |
containsKey(Object key) |
protected String |
convertKey(String key)
Convert the given key to a case-insensitive key.
|
V |
get(Object key) |
<T> T |
get(String attr,
T defaultValue)
获得特定类型值
|
BigDecimal |
getBigDecimal(String attr) |
BigInteger |
getBigInteger(String attr) |
Boolean |
getBool(String attr) |
Byte |
getByte(String attr) |
byte[] |
getBytes(String attr) |
Character |
getChar(String attr) |
Date |
getDate(String attr) |
Double |
getDouble(String attr) |
<E extends Enum<E>> |
getEnum(Class<E> clazz,
String key) |
Float |
getFloat(String attr) |
Integer |
getInt(String attr) |
Long |
getLong(String attr) |
Number |
getNumber(String attr) |
Object |
getObj(String key) |
Short |
getShort(String attr) |
Timestamp |
getTimestamp(String attr) |
V |
put(String key,
V value) |
void |
putAll(Map<? extends String,? extends V> map) |
V |
remove(Object key) |
DTDMap<V> |
setIgnoreNull(String attr,
V value)
设置列,当键或值为null时忽略
|
containsValue, entrySet, forEach, getOrDefault, keySet, removeEldestEntry, replaceAll, valuesclone, compute, computeIfAbsent, computeIfPresent, isEmpty, merge, putIfAbsent, remove, replace, replace, sizeequals, hashCode, toStringcompute, computeIfAbsent, computeIfPresent, equals, hashCode, isEmpty, merge, putIfAbsent, remove, replace, replace, sizepublic DTDMap()
String.toLowerCase()public DTDMap(Locale locale)
locale - the Locale to use for lower-case conversionString.toLowerCase(Locale)public DTDMap(int initialCapacity)
LinkedHashMap
with the given initial capacity and stores lower-case keys according
to the default Locale.initialCapacity - the initial capacityString.toLowerCase()public DTDMap(int initialCapacity,
Locale locale)
LinkedHashMap
with the given initial capacity and stores lower-case keys according
to the given Locale.initialCapacity - the initial capacitylocale - the Locale to use for lower-case conversionString.toLowerCase(Locale)public boolean containsKey(Object key)
containsKey 在接口中 Map<String,V>containsKey 在类中 HashMap<String,V>public <T> T get(String attr, T defaultValue)
T - 值类型attr - 字段名defaultValue - 默认值public BigDecimal getBigDecimal(String attr)
attr - 字段名public BigInteger getBigInteger(String attr)
attr - 字段名public byte[] getBytes(String attr)
attr - 字段名protected String convertKey(String key)
The default implementation converts the key to lower-case according to this Map's Locale.
key - the user-specified keyString.toLowerCase(Locale)Copyright © 2021. All rights reserved.