Class ImmutableSortedMap.Builder<K,V>

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

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

    • put

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

      public ImmutableSortedMap.Builder<K,V> putAll(Map<? extends K, ? extends V> map)
      Put all entries. 放入所有条目。
      Parameters:
      map - the map | 映射
      Returns:
      this builder | 此构建器
    • build

      public ImmutableSortedMap<K,V> build()
      Build the immutable sorted map. 构建不可变有序映射。
      Returns:
      immutable sorted map | 不可变有序映射