Top Description Fields Constructors Methods
com.google.common.collect

pack-priv Class SingletonImmutableTable<R, C, V>

extends ImmutableTable<R, C, V>
Class Inheritance
Annotations
@GwtCompatible
@ElementTypesAreNonnullByDefault
Static Imports
com.google.common.base.Preconditions.checkNotNull

An implementation of ImmutableTable that holds a single cell.
Author
Gregory Kick

Field Summary

Modifier and TypeField and Description
pack-priv final C
pack-priv final R
pack-priv final V

Constructor Summary

AccessConstructor and Description
pack-priv
SingletonImmutableTable(R rowKey, C columnKey, V value)

pack-priv

Method Summary

Modifier and TypeMethod and Description
public ImmutableMap<R, V>
column(C
key of column to search for in the table
columnKey
)

Overrides com.google.common.collect.ImmutableTable.column.

Implements com.google.common.collect.Table.column.

Returns a view of all mappings that have the given column key.
public ImmutableMap<C, Map<R, V>>
columnMap()

Implements abstract com.google.common.collect.ImmutableTable.columnMap.

Implements com.google.common.collect.Table.columnMap.

Returns a view that associates each column key with the corresponding map from row keys to values.
pack-priv ImmutableSet<Table.Cell<R, C, V>>
pack-priv ImmutableCollection<V>
public ImmutableMap<R, Map<C, V>>
rowMap()

Implements abstract com.google.common.collect.ImmutableTable.rowMap.

Implements com.google.common.collect.Table.rowMap.

Returns a view that associates each row key with the corresponding map from column keys to values.
public int
size()

Implements com.google.common.collect.Table.size.

Returns the number of row key / column key / value mappings in the table.
pack-priv Object
Inherited from com.google.common.collect.ImmutableTable:
buildercellIteratorcellOfcellSetcellSpliteratorclearcolumnKeySetcontainscontainsValuecopyOfcopyOfofofputputAllremoverowrowKeySettoImmutableTabletoImmutableTablevaluesvaluesIterator

Field Detail

singleColumnKeyback to summary
pack-priv final C singleColumnKey
singleRowKeyback to summary
pack-priv final R singleRowKey
singleValueback to summary
pack-priv final V singleValue

Constructor Detail

SingletonImmutableTableback to summary
pack-priv SingletonImmutableTable(R rowKey, C columnKey, V value)
SingletonImmutableTableback to summary
pack-priv SingletonImmutableTable(Table.Cell<R, C, V> cell)

Method Detail

columnback to summary
public ImmutableMap<R, V> column(C columnKey)

Overrides com.google.common.collect.ImmutableTable.column.

Implements com.google.common.collect.Table.column.

Doc from com.google.common.collect.ImmutableTable.column.

Returns a view of all mappings that have the given column key. For each row key / column key / value mapping in the table with that column key, the returned map associates the row key with the value. If no mappings in the table have the provided column key, an empty map is returned.

Changes to the returned map will update the underlying table, and vice versa.

Parameters
columnKey:C

Doc from com.google.common.collect.Table.column.

key of column to search for in the table

Returns:ImmutableMap<R, V>

Doc from com.google.common.collect.Table.column.

the corresponding map from row keys to values

Annotations
@Override
columnMapback to summary
public ImmutableMap<C, Map<R, V>> columnMap()

Implements abstract com.google.common.collect.ImmutableTable.columnMap.

Implements com.google.common.collect.Table.columnMap.

Doc from com.google.common.collect.ImmutableTable.columnMap.

Returns a view that associates each column key with the corresponding map from row keys to values. Changes to the returned map will update this table. The returned map does not support put() or putAll(), or setValue() on its entries.

In contrast, the maps returned by columnMap().get() have the same behavior as those returned by column. Those maps may support setValue(), put(), and putAll().

The value Map<R, V> instances in the returned map are ImmutableMap instances as well.

Returns:ImmutableMap<C, Map<R, V>>

Doc from com.google.common.collect.Table.columnMap.

a map view from each column key to a secondary map from row keys to values

Annotations
@Override
createCellSetback to summary
pack-priv ImmutableSet<Table.Cell<R, C, V>> createCellSet()

Implements abstract com.google.common.collect.ImmutableTable.createCellSet.

Annotations
@Override
createValuesback to summary
pack-priv ImmutableCollection<V> createValues()

Implements abstract com.google.common.collect.ImmutableTable.createValues.

Annotations
@Override
rowMapback to summary
public ImmutableMap<R, Map<C, V>> rowMap()

Implements abstract com.google.common.collect.ImmutableTable.rowMap.

Implements com.google.common.collect.Table.rowMap.

Doc from com.google.common.collect.ImmutableTable.rowMap.

Returns a view that associates each row key with the corresponding map from column keys to values. Changes to the returned map will update this table. The returned map does not support put() or putAll(), or setValue() on its entries.

In contrast, the maps returned by rowMap().get() have the same behavior as those returned by row. Those maps may support setValue(), put(), and putAll().

The value Map<C, V> instances in the returned map are ImmutableMap instances as well.

Returns:ImmutableMap<R, Map<C, V>>

Doc from com.google.common.collect.Table.rowMap.

a map view from each row key to a secondary map from column keys to values

Annotations
@Override
sizeback to summary
public int size()

Implements com.google.common.collect.Table.size.

Doc from com.google.common.collect.Table.size.

Returns the number of row key / column key / value mappings in the table.

Annotations
@Override
writeReplaceback to summary
pack-priv Object writeReplace()

Implements abstract com.google.common.collect.ImmutableTable.writeReplace.

Annotations
@Override
@J2ktIncompatible
@GwtIncompatible