Class ImmutableListMultimap.Builder<K,V>

java.lang.Object
cloud.opencode.base.collections.immutable.ImmutableListMultimap.Builder<K,V>
Type Parameters:
K - key type | 键类型
V - value type | 值类型
Enclosing class:
ImmutableListMultimap<K,V>

public static final class ImmutableListMultimap.Builder<K,V> extends Object
Builder for ImmutableListMultimap. ImmutableListMultimap 构建器。
Since:
JDK 25, opencode-base-collections V1.0.0
Author:
Leon Soo www.LeonSoo.com
  • Method Details

    • put

      public ImmutableListMultimap.Builder<K,V> put(K key, V value)
      Put entry. 放入条目。
      Parameters:
      key - the key | 键
      value - the value | 值
      Returns:
      this builder | 此构建器
    • putAll

      public ImmutableListMultimap.Builder<K,V> putAll(K key, Iterable<? extends V> values)
      Put all values for a key. 为键放入所有值。
      Parameters:
      key - the key | 键
      values - the values | 值
      Returns:
      this builder | 此构建器
    • putAll

      @SafeVarargs public final ImmutableListMultimap.Builder<K,V> putAll(K key, V... values)
      Put all values for a key. 为键放入所有值。
      Parameters:
      key - the key | 键
      values - the values | 值
      Returns:
      this builder | 此构建器
    • putAll

      public ImmutableListMultimap.Builder<K,V> putAll(Multimap<? extends K, ? extends V> multimap)
      Put all entries from a multimap. 从多值映射放入所有条目。
      Parameters:
      multimap - the multimap | 多值映射
      Returns:
      this builder | 此构建器
    • build

      public ImmutableListMultimap<K,V> build()
      Build the immutable list multimap. 构建不可变列表多值映射。
      Returns:
      immutable list multimap | 不可变列表多值映射