Package com.google.common.collect
Class SingletonImmutableTable<R,C,V>
java.lang.Object
com.google.common.collect.AbstractTable<R,C,V>
com.google.common.collect.ImmutableTable<R,C,V>
com.google.common.collect.SingletonImmutableTable<R,C,V>
- All Implemented Interfaces:
Table<R,,C, V> Serializable
An implementation of
ImmutableTable that holds a single cell.-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.common.collect.ImmutableTable
ImmutableTable.Builder<R,C, V>, ImmutableTable.SerializedForm Nested classes/interfaces inherited from class com.google.common.collect.AbstractTable
AbstractTable.CellSet, AbstractTable.ValuesNested classes/interfaces inherited from interface com.google.common.collect.Table
Table.Cell<R,C, V> -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSingletonImmutableTable(Table.Cell<R, C, V> cell) SingletonImmutableTable(R rowKey, C columnKey, V value) -
Method Summary
Modifier and TypeMethodDescriptionReturns a view of all mappings that have the given column key.ImmutableMap<C,Map<R, V>> 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>> (package private) ImmutableTable.SerializedFormCreates the common serialized form for this table.(package private) ImmutableCollection<V>ImmutableMap<R,Map<C, V>> rowMap()Returns a view that associates each row key with the corresponding map from column keys to values.intsize()Returns the number of row key / column key / value mappings in the table.Methods inherited from class com.google.common.collect.ImmutableTable
builder, cellIterator, cellOf, cellSet, cellSpliterator, clear, columnKeySet, contains, containsValue, copyOf, copyOf, of, of, put, putAll, remove, row, rowKeySet, toImmutableTable, toImmutableTable, values, valuesIterator, writeReplaceMethods inherited from class com.google.common.collect.AbstractTable
containsColumn, containsRow, equals, get, hashCode, isEmpty, toString, valuesSpliterator
-
Field Details
-
singleRowKey
-
singleColumnKey
-
singleValue
-
-
Constructor Details
-
SingletonImmutableTable
-
SingletonImmutableTable
SingletonImmutableTable(Table.Cell<R, C, V> cell)
-
-
Method Details
-
column
Description copied from class:ImmutableTableReturns 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.
-
columnMap
Description copied from class:ImmutableTableReturns 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 supportput()orputAll(), orsetValue()on its entries.In contrast, the maps returned by
columnMap().get()have the same behavior as those returned byTable.column(C). Those maps may supportsetValue(),put(), andputAll().The value
Map<R, V>instances in the returned map areImmutableMapinstances as well. -
rowMap
Description copied from class:ImmutableTableReturns 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 supportput()orputAll(), orsetValue()on its entries.In contrast, the maps returned by
rowMap().get()have the same behavior as those returned byTable.row(R). Those maps may supportsetValue(),put(), andputAll().The value
Map<C, V>instances in the returned map areImmutableMapinstances as well. -
size
public int size()Description copied from interface:TableReturns the number of row key / column key / value mappings in the table. -
createCellSet
ImmutableSet<Table.Cell<R,C, createCellSet()V>> - Specified by:
createCellSetin classImmutableTable<R,C, V>
-
createValues
ImmutableCollection<V> createValues()- Specified by:
createValuesin classImmutableTable<R,C, V>
-
createSerializedForm
ImmutableTable.SerializedForm createSerializedForm()Description copied from class:ImmutableTableCreates the common serialized form for this table.- Specified by:
createSerializedFormin classImmutableTable<R,C, V>
-