public class GroupedMap extends LinkedHashMap<String,LinkedHashMap<String,String>>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
GroupedMap() |
| Modifier and Type | Method and Description |
|---|---|
GroupedMap |
clear(String group)
清除指定分组下的所有键值对
|
boolean |
containsKey(String group,
String key)
指定分组中是否包含指定key
|
boolean |
containsValue(String group,
String value)
指定分组中是否包含指定值
|
Set<Map.Entry<String,LinkedHashMap<String,String>>> |
entrySet() |
Set<Map.Entry<String,String>> |
entrySet(String group)
指定分组下所有键值对
|
String |
get(CharSequence group,
CharSequence key)
获取分组对应的值,如果分组不存在或者值不存在则返回null
|
LinkedHashMap<String,String> |
get(Object key) |
boolean |
isEmpty()
是否为空,如果多个分组同时为空,也按照空处理
|
boolean |
isEmpty(String group)
某个分组对应的键值对是否为空
|
Set<String> |
keySet() |
Set<String> |
keySet(String group)
指定分组所有键的Set
|
String |
put(String group,
String key,
String value)
将键值对加入到对应分组中
|
GroupedMap |
putAll(String group,
Map<? extends String,? extends String> m)
加入多个键值对到某个分组下
|
String |
remove(String group,
String key)
从指定分组中删除指定值
|
int |
size()
总的键值对数
|
String |
toString() |
Collection<String> |
values(String group)
指定分组下所有值
|
clear, containsValue, forEach, getOrDefault, removeEldestEntry, replaceAll, valuesclone, compute, computeIfAbsent, computeIfPresent, containsKey, merge, put, putAll, putIfAbsent, remove, remove, replace, replaceequals, hashCodefinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, merge, put, putAll, putIfAbsent, remove, remove, replace, replacepublic String get(CharSequence group, CharSequence key)
group - 分组key - 键public LinkedHashMap<String,String> get(Object key)
get in interface Map<String,LinkedHashMap<String,String>>get in class LinkedHashMap<String,LinkedHashMap<String,String>>public int size()
public String put(String group, String key, String value)
group - 分组key - 键value - 值public GroupedMap putAll(String group, Map<? extends String,? extends String> m)
group - 分组m - 键值对public String remove(String group, String key)
group - 分组key - 键public boolean isEmpty(String group)
group - 分组public boolean isEmpty()
public boolean containsKey(String group, String key)
group - 分组key - 键public boolean containsValue(String group, String value)
group - 分组value - 值public GroupedMap clear(String group)
group - 分组public Set<String> keySet()
keySet in interface Map<String,LinkedHashMap<String,String>>keySet in class LinkedHashMap<String,LinkedHashMap<String,String>>public Collection<String> values(String group)
group - 分组public Set<Map.Entry<String,LinkedHashMap<String,String>>> entrySet()
entrySet in interface Map<String,LinkedHashMap<String,String>>entrySet in class LinkedHashMap<String,LinkedHashMap<String,String>>public Set<Map.Entry<String,String>> entrySet(String group)
group - 分组public String toString()
toString in class AbstractMap<String,LinkedHashMap<String,String>>Copyright © 2025. All rights reserved.