“Class Pairs”(班级配对)

java.lang.Object
com.google.adk.utils.Pairs

public final class Pairs extends Object
用于创建 `ConcurrentHashMap` 的实用类。
  • 方法概述

    Modifier and Type
    Method
    Description
    static <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 其中包含十个映射关系(即十个键值对)。

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 方法详细信息(Method Details)

    • of

      public static <K,V> ConcurrentHashMap<K,V> of()
      返回一个新的、空的对象。 ConcurrentHashMap.
      Type Parameters:
      K - the ConcurrentHashMap's key type
      V - the ConcurrentHashMap's value type
      Returns:
      an empty ConcurrentHashMap
    • of

      public static <K,V> ConcurrentHashMap<K,V> of(K k1, V v1)
      返回一个新的对象。 ConcurrentHashMap 其中包含一个映射(mapping)。
      Type Parameters:
      K - the ConcurrentHashMap's key type
      V - the ConcurrentHashMap's value type
      Parameters:
      k1 - the mapping's key
      v1 - the mapping's value
      Returns:
      a ConcurrentHashMap containing the specified mapping
      Throws:
      NullPointerException - if the key or the value is null
    • of

      public static <K,V> ConcurrentHashMap<K,V> of(K k1, V v1, K k2, V v2)
      返回一个新的对象。 ConcurrentHashMap 包含两个映射关系。该方法充分利用了这些映射关系来实现相应的功能。 java.util.Map.of 用于初步验证。
      Type Parameters:
      K - the ConcurrentHashMap's key type
      V - the ConcurrentHashMap's value type
      Parameters:
      k1 - the first mapping's key
      v1 - the first mapping's value
      k2 - the second mapping's key
      v2 - the second mapping's value
      Returns:
      a ConcurrentHashMap containing the specified mappings
    • of

      public static <K,V> ConcurrentHashMap<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3)
      返回一个新的对象。 ConcurrentHashMap 包含三个映射(mapping)。该方法充分利用了(相关资源或功能)。 java.util.Map.of 用于初步验证。
      Type Parameters:
      K - the ConcurrentHashMap's key type
      V - the ConcurrentHashMap's value type
      Parameters:
      k1 - the first mapping's key
      v1 - the first mapping's value
      k2 - the second mapping's key
      v2 - the second mapping's value
      k3 - the third mapping's key
      v3 - the third mapping's value
      Returns:
      a ConcurrentHashMap containing 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)
      返回一个新的对象。 ConcurrentHashMap 包含四个映射关系。该方法充分利用了(某些功能或优势)。 java.util.Map.of 用于初步验证。
      Type Parameters:
      K - the ConcurrentHashMap's key type
      V - the ConcurrentHashMap's value type
      Parameters:
      k1 - the first mapping's key
      v1 - the first mapping's value
      k2 - the second mapping's key
      v2 - the second mapping's value
      k3 - the third mapping's key
      v3 - the third mapping's value
      k4 - the fourth mapping's key
      v4 - the fourth mapping's value
      Returns:
      a ConcurrentHashMap containing 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 - the ConcurrentHashMap's key type
      V - the ConcurrentHashMap's value type
      Parameters:
      k1 - the first mapping's key
      v1 - the first mapping's value
      k2 - the second mapping's key
      v2 - the second mapping's value
      k3 - the third mapping's key
      v3 - the third mapping's value
      k4 - the fourth mapping's key
      v4 - the fourth mapping's value
      k5 - the fifth mapping's key
      v5 - the fifth mapping's value
      Returns:
      a ConcurrentHashMap containing 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 - the ConcurrentHashMap's key type
      V - the ConcurrentHashMap's value type
      Parameters:
      k1 - the first mapping's key
      v1 - the first mapping's value
      k2 - the second mapping's key
      v2 - the second mapping's value
      k3 - the third mapping's key
      v3 - the third mapping's value
      k4 - the fourth mapping's key
      v4 - the fourth mapping's value
      k5 - the fifth mapping's key
      v5 - the fifth mapping's value
      k6 - the sixth mapping's key
      v6 - the sixth mapping's value
      Returns:
      a ConcurrentHashMap containing the specified mappings
      Throws:
      IllegalArgumentException - if there are any duplicate keys (behavior inherited from Map.of)
      NullPointerException - if any key or value is null (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 - the ConcurrentHashMap's key type
      V - the ConcurrentHashMap's value type
      Parameters:
      k1 - the first mapping's key
      v1 - the first mapping's value
      k2 - the second mapping's key
      v2 - the second mapping's value
      k3 - the third mapping's key
      v3 - the third mapping's value
      k4 - the fourth mapping's key
      v4 - the fourth mapping's value
      k5 - the fifth mapping's key
      v5 - the fifth mapping's value
      k6 - the sixth mapping's key
      v6 - the sixth mapping's value
      k7 - the seventh mapping's key
      v7 - the seventh mapping's value
      Returns:
      a ConcurrentHashMap containing 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 - the ConcurrentHashMap's key type
      V - the ConcurrentHashMap's value type
      Parameters:
      k1 - the first mapping's key
      v1 - the first mapping's value
      k2 - the second mapping's key
      v2 - the second mapping's value
      k3 - the third mapping's key
      v3 - the third mapping's value
      k4 - the fourth mapping's key
      v4 - the fourth mapping's value
      k5 - the fifth mapping's key
      v5 - the fifth mapping's value
      k6 - the sixth mapping's key
      v6 - the sixth mapping's value
      k7 - the seventh mapping's key
      v7 - the seventh mapping's value
      k8 - the eighth mapping's key
      v8 - the eighth mapping's value
      Returns:
      a ConcurrentHashMap containing 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 - the ConcurrentHashMap's key type
      V - the ConcurrentHashMap's value type
      Parameters:
      k1 - the first mapping's key
      v1 - the first mapping's value
      k2 - the second mapping's key
      v2 - the second mapping's value
      k3 - the third mapping's key
      v3 - the third mapping's value
      k4 - the fourth mapping's key
      v4 - the fourth mapping's value
      k5 - the fifth mapping's key
      v5 - the fifth mapping's value
      k6 - the sixth mapping's key
      v6 - the sixth mapping's value
      k7 - the seventh mapping's key
      v7 - the seventh mapping's value
      k8 - the eighth mapping's key
      v8 - the eighth mapping's value
      k9 - the ninth mapping's key
      v9 - the ninth mapping's value
      Returns:
      a ConcurrentHashMap containing 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 - the ConcurrentHashMap's key type
      V - the ConcurrentHashMap's value type
      Parameters:
      k1 - the first mapping's key
      v1 - the first mapping's value
      k2 - the second mapping's key
      v2 - the second mapping's value
      k3 - the third mapping's key
      v3 - the third mapping's value
      k4 - the fourth mapping's key
      v4 - the fourth mapping's value
      k5 - the fifth mapping's key
      v5 - the fifth mapping's value
      k6 - the sixth mapping's key
      v6 - the sixth mapping's value
      k7 - the seventh mapping's key
      v7 - the seventh mapping's value
      k8 - the eighth mapping's key
      v8 - the eighth mapping's value
      k9 - the ninth mapping's key
      v9 - the ninth mapping's value
      k10 - the tenth mapping's key
      v10 - the tenth mapping's value
      Returns:
      a ConcurrentHashMap containing the specified mappings