Class RowKeyTable<R,C,V>
java.lang.Object
org.miaixz.bus.core.center.map.multi.AbstractTable<R,C,V>
org.miaixz.bus.core.center.map.multi.RowKeyTable<R,C,V>
- Type Parameters:
R- 行类型C- 列类型V- 值类型
- All Implemented Interfaces:
Iterable<Table.Cell<R,,C, V>> Table<R,C, V>
将行的键作为主键的
Table实现 此结构为: 行=(列=值)- Since:
- Java 17+
- Author:
- Kimi Liu
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.miaixz.bus.core.center.map.multi.Table
Table.Cell<R,C, V> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()清空表格返回所有列的key,列的key如果实现Map是可重复key,则返回对应不去重的List。返回所有列的key,列的key不可重复返回列-行对应的mapbooleancontainsColumn(C columnKey) 列是否存在获取列booleanisEmpty()表格是否为空为表格指定行列赋值,如果不存在,创建之,存在则替换之,返回原值移除指定值rowMap()返回行列对应的MapMethods inherited from class org.miaixz.bus.core.center.map.multi.AbstractTable
cellSet, equals, hashCode, iterator, toString, valuesMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface org.miaixz.bus.core.center.map.multi.Table
contains, containsRow, containsValue, forEach, get, getRow, putAll, rowKeySet, size
-
Constructor Details
-
RowKeyTable
public RowKeyTable()构造 -
RowKeyTable
public RowKeyTable(boolean isLinked) 构造- Parameters:
isLinked- 是否有序,有序则使用LinkedHashMap作为原始Map
-
RowKeyTable
构造- Parameters:
raw- 原始Map
-
RowKeyTable
构造- Parameters:
raw- 原始MapcolumnMapBuilder- 列的map创建器
-
-
Method Details
-
rowMap
Description copied from interface:Table返回行列对应的Map- Returns:
- map,键为行键,值为列和值的对应map
-
put
Description copied from interface:Table为表格指定行列赋值,如果不存在,创建之,存在则替换之,返回原值- Parameters:
rowKey- 行键columnKey- 列键value- 值- Returns:
- 原值,不存在返回
null
-
remove
Description copied from interface:Table移除指定值- Parameters:
rowKey- 行键columnKey- 列键- Returns:
- 移除的值,如果值不存在,返回
null
-
isEmpty
public boolean isEmpty()Description copied from interface:Table表格是否为空- Returns:
- 是否为空
-
clear
public void clear()Description copied from interface:Table清空表格 -
containsColumn
Description copied from interface:Table列是否存在- Parameters:
columnKey- 列键- Returns:
- 列是否存在
-
columnMap
Description copied from interface:Table返回列-行对应的map- Returns:
- map,键为列键,值为行和值的对应map
-
columnKeySet
Description copied from interface:Table返回所有列的key,列的key不可重复- Returns:
- 列set
-
columnKeys
Description copied from interface:Table返回所有列的key,列的key如果实现Map是可重复key,则返回对应不去重的List。- Returns:
- 列set
-
getColumn
Description copied from interface:Table获取列- Parameters:
columnKey- 列键- Returns:
- 列映射,返回的键为行键,值为表格的值
-