-
- 类型参数:
V- 泛型 值
- 所有已知实现类:
ArrayListMap,BaseListMap,LinkedListMap
public interface ListMap<V> extends Map<String,V>
一个 Key 可以有多个 Value 的 有序 Map 集合,内部使用List实现- 从以下版本开始:
- v1.4.0
- 作者:
- troy zhou
-
-
方法概要
所有方法 实例方法 抽象方法 默认方法 修饰符和类型 方法 说明 voidforEach(BiConsumer<? super String,? super V> action)遍历,该方法是为兼容 Android 低版本Vget(Object key)获取与指定 key 匹配的最后(新)的一个值Vget(String key, boolean ic)获取与指定 key 匹配的最后(新)的一个值default List<V>list(String key)获取与指定 key 匹配的所有值列表List<V>list(String key, boolean ic)获取与指定 key 匹配的所有值列表Vput(String key, V value)向 Map 里放值Vremove(Object key)移除与指定 key 匹配的最后(新)一个值Vremove(String key, boolean ic)移除与指定 key 匹配的最后(新)一个值default List<V>removeAll(String key)移除与指定 key 匹配的所有值List<V>removeAll(String key, boolean ic)移除与指定 key 匹配的所有值Vreplace(String key, V value)替换与指定 key 匹配的最后(新)的一个值Vreplace(String key, V value, boolean ic)替换与指定 key 匹配的最后(新)的一个值default intreplaceAll(String key, V value)替换与指定 key 匹配的所有值intreplaceAll(String key, V value, boolean ic)替换与指定 key 匹配的所有值-
从接口继承的方法 java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, getOrDefault, hashCode, isEmpty, keySet, merge, putAll, putIfAbsent, remove, replace, replaceAll, size, values
-
-
-
-
方法详细资料
-
get
V get(String key, boolean ic)
获取与指定 key 匹配的最后(新)的一个值- 参数:
key- 键ic- 匹配 key 时是否忽略大小写- 返回:
- 匹配 key 的最后(新)的一个值
-
list
List<V> list(String key, boolean ic)
获取与指定 key 匹配的所有值列表- 参数:
key- 键ic- 匹配 key 时是否忽略大小写- 返回:
- List
-
replace
V replace(String key, V value, boolean ic)
替换与指定 key 匹配的最后(新)的一个值- 参数:
key- 键ic- 匹配 key 时是否忽略大小写- 返回:
- 被替换的值
-
replaceAll
int replaceAll(String key, V value, boolean ic)
替换与指定 key 匹配的所有值- 参数:
key- 键ic- 匹配 key 时是否忽略大小写- 返回:
- 被替换的键值对数量
-
forEach
void forEach(BiConsumer<? super String,? super V> action)
遍历,该方法是为兼容 Android 低版本
-
remove
V remove(String key, boolean ic)
移除与指定 key 匹配的最后(新)一个值- 参数:
key- 键ic- 匹配 key 时是否忽略大小写- 返回:
- the value was removed
-
removeAll
default List<V> removeAll(String key)
移除与指定 key 匹配的所有值- 参数:
key- 键- 返回:
- the value was removed
-
-