R
- 行类型C
- 列类型V
- 值类型public class RowKeyTable<R,C,V> extends AbsTable<R,C,V>
Table
实现Table.Cell<R,C,V>
Constructor and Description |
---|
RowKeyTable()
构造
|
RowKeyTable(boolean isLinked)
构造
|
RowKeyTable(Map<R,Map<C,V>> raw)
构造
|
RowKeyTable(Map<R,Map<C,V>> raw,
Builder<? extends Map<C,V>> columnMapBuilder)
构造
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
清空表格
|
List<C> |
columnKeys()
返回所有列的key,列的key如果实现Map是可重复key,则返回对应不去重的List。
|
Set<C> |
columnKeySet()
返回所有列的key,列的key不可重复
|
Map<C,Map<R,V>> |
columnMap()
返回列-行对应的map
|
boolean |
containsColumn(C columnKey)
列是否存在
|
Map<R,V> |
getColumn(C columnKey)
获取列
|
boolean |
isEmpty()
表格是否为空
|
V |
put(R rowKey,
C columnKey,
V value)
为表格指定行列赋值,如果不存在,创建之,存在则替换之,返回原值
|
V |
remove(R rowKey,
C columnKey)
移除指定值
|
Map<R,Map<C,V>> |
rowMap()
返回行列对应的Map
|
cellSet, equals, hashCode, iterator, toString, values
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
contains, containsRow, containsValue, forEach, get, getRow, putAll, rowKeySet, size
forEach, spliterator
public RowKeyTable()
public RowKeyTable(boolean isLinked)
isLinked
- 是否有序,有序则使用LinkedHashMap
作为原始Mappublic Map<R,Map<C,V>> rowMap()
Table
public V put(R rowKey, C columnKey, V value)
Table
rowKey
- 行键columnKey
- 列键value
- 值null
public V remove(R rowKey, C columnKey)
Table
rowKey
- 行键columnKey
- 列键null
public boolean isEmpty()
Table
public void clear()
Table
public boolean containsColumn(C columnKey)
Table
columnKey
- 列键public Map<C,Map<R,V>> columnMap()
Table
public Set<C> columnKeySet()
Table
public List<C> columnKeys()
Table
Copyright © 2024. All rights reserved.