“Class Pairs”(班级配对)
java.lang.Object
com.google.adk.utils.Pairs
用于创建 `ConcurrentHashMap` 的实用类。
-
方法概述
Modifier and TypeMethodDescriptionstatic <K,V> ConcurrentHashMap <K, V> of()返回一个新的、空的对象。ConcurrentHashMap.static <K,V> ConcurrentHashMap <K, V> of(K k1, V v1) 返回一个新的对象。ConcurrentHashMap其中包含一个映射(mapping)。static <K,V> ConcurrentHashMap <K, V> of(K k1, V v1, K k2, V v2) 返回一个新的对象。ConcurrentHashMap其中包含两个映射(mapping)。static <K,V> ConcurrentHashMap <K, V> of(K k1, V v1, K k2, V v2, K k3, V v3) 返回一个新的对象。ConcurrentHashMap其中包含三个映射(mapping)。static <K,V> ConcurrentHashMap <K, V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4) 返回一个新的对象。ConcurrentHashMap其中包含四个映射(mapping)。static <K,V> ConcurrentHashMap <K, V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5) 返回一个新的对象。ConcurrentHashMap其中包含五个映射关系(即五个数据对应关系)。static <K,V> ConcurrentHashMap <K, V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6) 返回一个新的对象。ConcurrentHashMap其中包含六个映射关系(即六个数据对应关系)。static <K,V> ConcurrentHashMap <K, V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7) 返回一个新的对象。ConcurrentHashMap其中包含七个映射关系(即七个数据对应关系)。static <K,V> ConcurrentHashMap <K, V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8) 返回一个新的对象。ConcurrentHashMap其中包含八个映射(mapping)记录。static <K,V> ConcurrentHashMap <K, V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8, K k9, V v9) 返回一个新的对象。ConcurrentHashMap其中包含九个映射关系(即九个数据对应关系)。static <K,V> ConcurrentHashMap <K, V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8, K k9, V v9, K k10, V v10) 返回一个新的对象。ConcurrentHashMap其中包含十个映射关系(即十个键值对)。
-
方法详细信息(Method Details)
-
of
返回一个新的、空的对象。ConcurrentHashMap.- Type Parameters:
K- theConcurrentHashMap's key typeV- theConcurrentHashMap's value type- Returns:
- an empty
ConcurrentHashMap
-
of
返回一个新的对象。ConcurrentHashMap其中包含一个映射(mapping)。- Type Parameters:
K- theConcurrentHashMap's key typeV- theConcurrentHashMap's value type- Parameters:
k1- the mapping's keyv1- the mapping's value- Returns:
- a
ConcurrentHashMapcontaining the specified mapping - Throws:
NullPointerException- if the key or the value isnull
-
of
返回一个新的对象。ConcurrentHashMap包含两个映射关系。该方法充分利用了这些映射关系来实现相应的功能。java.util.Map.of用于初步验证。- Type Parameters:
K- theConcurrentHashMap's key typeV- theConcurrentHashMap's value type- Parameters:
k1- the first mapping's keyv1- the first mapping's valuek2- the second mapping's keyv2- the second mapping's value- Returns:
- a
ConcurrentHashMapcontaining the specified mappings
-
of
返回一个新的对象。ConcurrentHashMap包含三个映射(mapping)。该方法充分利用了(相关资源或功能)。java.util.Map.of用于初步验证。- Type Parameters:
K- theConcurrentHashMap's key typeV- theConcurrentHashMap's value type- Parameters:
k1- the first mapping's keyv1- the first mapping's valuek2- the second mapping's keyv2- the second mapping's valuek3- the third mapping's keyv3- the third mapping's value- Returns:
- a
ConcurrentHashMapcontaining the specified mappings
-
of
返回一个新的对象。ConcurrentHashMap包含四个映射关系。该方法充分利用了(某些功能或优势)。java.util.Map.of用于初步验证。- Type Parameters:
K- theConcurrentHashMap's key typeV- theConcurrentHashMap's value type- Parameters:
k1- the first mapping's keyv1- the first mapping's valuek2- the second mapping's keyv2- the second mapping's valuek3- the third mapping's keyv3- the third mapping's valuek4- the fourth mapping's keyv4- the fourth mapping's value- Returns:
- a
ConcurrentHashMapcontaining the specified mappings
-
of
public static <K,V> ConcurrentHashMap<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5) 返回一个新的对象。ConcurrentHashMap包含五个映射关系。该方法充分利用了(某些功能或优势)。java.util.Map.of用于初步验证。- Type Parameters:
K- theConcurrentHashMap's key typeV- theConcurrentHashMap's value type- Parameters:
k1- the first mapping's keyv1- the first mapping's valuek2- the second mapping's keyv2- the second mapping's valuek3- the third mapping's keyv3- the third mapping's valuek4- the fourth mapping's keyv4- the fourth mapping's valuek5- the fifth mapping's keyv5- the fifth mapping's value- Returns:
- a
ConcurrentHashMapcontaining the specified mappings
-
of
public static <K,V> ConcurrentHashMap<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6) 返回一个新的对象。ConcurrentHashMap包含六个映射关系。该方法充分利用了(某些功能或优势)。java.util.Map.of用于初步验证。- Type Parameters:
K- theConcurrentHashMap's key typeV- theConcurrentHashMap's value type- Parameters:
k1- the first mapping's keyv1- the first mapping's valuek2- the second mapping's keyv2- the second mapping's valuek3- the third mapping's keyv3- the third mapping's valuek4- the fourth mapping's keyv4- the fourth mapping's valuek5- the fifth mapping's keyv5- the fifth mapping's valuek6- the sixth mapping's keyv6- the sixth mapping's value- Returns:
- a
ConcurrentHashMapcontaining the specified mappings - Throws:
IllegalArgumentException- if there are any duplicate keys (behavior inherited from Map.of)NullPointerException- if any key or value isnull(behavior inherited from Map.of)
-
of
public static <K,V> ConcurrentHashMap<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7) 返回一个新的对象。ConcurrentHashMap包含七个映射关系。该方法充分利用了(相关资源或功能)。java.util.Map.of用于初步验证。- Type Parameters:
K- theConcurrentHashMap's key typeV- theConcurrentHashMap's value type- Parameters:
k1- the first mapping's keyv1- the first mapping's valuek2- the second mapping's keyv2- the second mapping's valuek3- the third mapping's keyv3- the third mapping's valuek4- the fourth mapping's keyv4- the fourth mapping's valuek5- the fifth mapping's keyv5- the fifth mapping's valuek6- the sixth mapping's keyv6- the sixth mapping's valuek7- the seventh mapping's keyv7- the seventh mapping's value- Returns:
- a
ConcurrentHashMapcontaining the specified mappings
-
of
public static <K,V> ConcurrentHashMap<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8) 返回一个新的对象。ConcurrentHashMap该方法包含八个映射(mapping);它充分利用了相关的技术或资源来实现其功能。java.util.Map.of用于初步验证。- Type Parameters:
K- theConcurrentHashMap's key typeV- theConcurrentHashMap's value type- Parameters:
k1- the first mapping's keyv1- the first mapping's valuek2- the second mapping's keyv2- the second mapping's valuek3- the third mapping's keyv3- the third mapping's valuek4- the fourth mapping's keyv4- the fourth mapping's valuek5- the fifth mapping's keyv5- the fifth mapping's valuek6- the sixth mapping's keyv6- the sixth mapping's valuek7- the seventh mapping's keyv7- the seventh mapping's valuek8- the eighth mapping's keyv8- the eighth mapping's value- Returns:
- a
ConcurrentHashMapcontaining the specified mappings
-
of
public static <K,V> ConcurrentHashMap<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8, K k9, V v9) 返回一个新的对象。ConcurrentHashMap包含九个映射关系。该方法充分利用了(某些功能或优势)。java.util.Map.of用于初步验证。- Type Parameters:
K- theConcurrentHashMap's key typeV- theConcurrentHashMap's value type- Parameters:
k1- the first mapping's keyv1- the first mapping's valuek2- the second mapping's keyv2- the second mapping's valuek3- the third mapping's keyv3- the third mapping's valuek4- the fourth mapping's keyv4- the fourth mapping's valuek5- the fifth mapping's keyv5- the fifth mapping's valuek6- the sixth mapping's keyv6- the sixth mapping's valuek7- the seventh mapping's keyv7- the seventh mapping's valuek8- the eighth mapping's keyv8- the eighth mapping's valuek9- the ninth mapping's keyv9- the ninth mapping's value- Returns:
- a
ConcurrentHashMapcontaining the specified mappings
-
of
public static <K,V> ConcurrentHashMap<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8, K k9, V v9, K k10, V v10) 返回一个新的对象。ConcurrentHashMap包含十个映射关系。该方法充分利用了(相关资源或技术)。java.util.Map.of用于初步验证。- Type Parameters:
K- theConcurrentHashMap's key typeV- theConcurrentHashMap's value type- Parameters:
k1- the first mapping's keyv1- the first mapping's valuek2- the second mapping's keyv2- the second mapping's valuek3- the third mapping's keyv3- the third mapping's valuek4- the fourth mapping's keyv4- the fourth mapping's valuek5- the fifth mapping's keyv5- the fifth mapping's valuek6- the sixth mapping's keyv6- the sixth mapping's valuek7- the seventh mapping's keyv7- the seventh mapping's valuek8- the eighth mapping's keyv8- the eighth mapping's valuek9- the ninth mapping's keyv9- the ninth mapping's valuek10- the tenth mapping's keyv10- the tenth mapping's value- Returns:
- a
ConcurrentHashMapcontaining the specified mappings
-