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>
Builder for ImmutableTable
ImmutableTable 构建器
- Since:
- JDK 25, opencode-base-collections V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Method Summary
-
Method Details
-
put
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, putV> (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, putAllV> (ImmutableTable<? extends R, ? extends C, ? extends V> table) Put all cells from another table. 从另一个表格放置所有单元格。- Parameters:
table- the table | 表格- Returns:
- this builder | 此构建器
-
build
Build the immutable table. 构建不可变表格。- Returns:
- immutable table | 不可变表格
-