class SingletonImmutableTable<R,C,V> extends ImmutableTable<R,C,V>
ImmutableTable
that holds a single cell.ImmutableTable.Builder<R,C,V>, ImmutableTable.SerializedForm
AbstractTable.CellSet, AbstractTable.Values
Table.Cell<R,C,V>
Modifier and Type | Field and Description |
---|---|
(package private) C |
singleColumnKey |
(package private) R |
singleRowKey |
(package private) V |
singleValue |
Constructor and Description |
---|
SingletonImmutableTable(R rowKey,
C columnKey,
V value) |
SingletonImmutableTable(Table.Cell<R,C,V> cell) |
Modifier and Type | Method and Description |
---|---|
ImmutableMap<R,V> |
column(C columnKey)
Returns a view of all mappings that have the given column key.
|
ImmutableMap<C,java.util.Map<R,V>> |
columnMap()
Returns a view that associates each column key with the corresponding map from row keys to
values.
|
(package private) ImmutableSet<Table.Cell<R,C,V>> |
createCellSet() |
(package private) ImmutableTable.SerializedForm |
createSerializedForm()
Creates the common serialized form for this table.
|
(package private) ImmutableCollection<V> |
createValues() |
ImmutableMap<R,java.util.Map<C,V>> |
rowMap()
Returns a view that associates each row key with the corresponding map from column keys to
values.
|
int |
size()
Returns the number of row key / column key / value mappings in the table.
|
builder, cellIterator, cellOf, cellSet, cellSpliterator, clear, columnKeySet, contains, containsValue, copyOf, copyOf, of, of, put, putAll, remove, row, rowKeySet, toImmutableTable, toImmutableTable, values, valuesIterator, writeReplace
containsColumn, containsRow, equals, get, hashCode, isEmpty, toString, valuesSpliterator
final R singleRowKey
final C singleColumnKey
final V singleValue
SingletonImmutableTable(Table.Cell<R,C,V> cell)
public ImmutableMap<R,V> column(C columnKey)
ImmutableTable
Changes to the returned map will update the underlying table, and vice versa.
public ImmutableMap<C,java.util.Map<R,V>> columnMap()
ImmutableTable
put()
or putAll()
, or setValue()
on its entries.
In contrast, the maps returned by columnMap().get()
have the same behavior as those
returned by Table.column(C)
. Those maps may support setValue()
, put()
, and
putAll()
.
The value Map<R, V>
instances in the returned map are ImmutableMap
instances
as well.
public ImmutableMap<R,java.util.Map<C,V>> rowMap()
ImmutableTable
put()
or putAll()
, or setValue()
on its entries.
In contrast, the maps returned by rowMap().get()
have the same behavior as those
returned by Table.row(R)
. Those maps may support setValue()
, put()
, and putAll()
.
The value Map<C, V>
instances in the returned map are ImmutableMap
instances
as well.
public int size()
Table
ImmutableSet<Table.Cell<R,C,V>> createCellSet()
createCellSet
in class ImmutableTable<R,C,V>
ImmutableCollection<V> createValues()
createValues
in class ImmutableTable<R,C,V>
ImmutableTable.SerializedForm createSerializedForm()
ImmutableTable
createSerializedForm
in class ImmutableTable<R,C,V>