Class ImmutableTable.Builder<R,C,V>

java.lang.Object
cloud.opencode.base.collections.immutable.ImmutableTable.Builder<R,C,V>
Type Parameters:
R - row key type | 行键类型
C - column key type | 列键类型
V - value type | 值类型
Enclosing class:
ImmutableTable<R,C,V>

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

    • put

      public ImmutableTable.Builder<R,C,V> put(R rowKey, C colKey, V value)
      Put a cell in the table. 在表格中放置单元格。
      Parameters:
      rowKey - the row key | 行键
      colKey - the column key | 列键
      value - the value | 值
      Returns:
      this builder | 此构建器
      Throws:
      OpenCollectionException - if the cell already exists | 如果单元格已存在
    • put

      public ImmutableTable.Builder<R,C,V> put(ImmutableTable.Cell<? extends R, ? extends C, ? extends V> cell)
      Put a cell in the table. 在表格中放置单元格。
      Parameters:
      cell - the cell | 单元格
      Returns:
      this builder | 此构建器
    • putAll

      public ImmutableTable.Builder<R,C,V> putAll(ImmutableTable<? extends R, ? extends C, ? extends V> table)
      Put all cells from another table. 从另一个表格放置所有单元格。
      Parameters:
      table - the table | 表格
      Returns:
      this builder | 此构建器
    • build

      public ImmutableTable<R,C,V> build()
      Build the immutable table. 构建不可变表格。
      Returns:
      immutable table | 不可变表格