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

pack-priv final Class DenseImmutableTable<R, C, V>

extends RegularImmutableTable<R, C, V>
Class Inheritance
Annotations
@GwtCompatible
@Immutable
containerOf:R, C, V
@ElementTypesAreNonnullByDefault
Static Imports
java.util.Objects.requireNonNull

A RegularImmutableTable optimized for dense data.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
private class
private abstract static class
DenseImmutableTable.ImmutableArrayMap<K, V>

An immutable map implementation backed by an indexed nullable array.

private class
private class

Field Summary

Modifier and TypeField and Description
private final int[]
private final int[]
private final int[]
private final ImmutableMap<C, Integer>
private final ImmutableMap<C, ImmutableMap<R, V>>
private final int[]
private final ImmutableMap<R, Integer>
private final ImmutableMap<R, ImmutableMap<C, V>>
private final @Nullable V[][]

Constructor Summary

AccessConstructor and Description
pack-priv
DenseImmutableTable(ImmutableList<Table.Cell<R, C, V>> cellList, ImmutableSet<R> rowSpace, ImmutableSet<C> columnSpace)

Method Summary

Modifier and TypeMethod and Description
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.
public V
get(Object
key of row to search for
rowKey
,
Object
key of column to search for
columnKey
)

Overrides com.google.common.collect.AbstractTable.get.

Implements com.google.common.collect.Table.get.

Returns the value corresponding to the given row and column keys, or null if no such mapping exists.
pack-priv Table.Cell<R, C, V>
pack-priv 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.RegularImmutableTable:
checkNoDuplicatecreateCellSetcreateValuesforCellsforCellsforOrderedComponents

Field Detail

cellColumnIndicesback to summary
private final int[] cellColumnIndices
Annotations
@SuppressWarnings:Immutable
cellRowIndicesback to summary
private final int[] cellRowIndices
Annotations
@SuppressWarnings:Immutable
columnCountsback to summary
private final int[] columnCounts
Annotations
@SuppressWarnings:Immutable
columnKeyToIndexback to summary
private final ImmutableMap<C, Integer> columnKeyToIndex
columnMapback to summary
private final ImmutableMap<C, ImmutableMap<R, V>> columnMap
rowCountsback to summary
private final int[] rowCounts
Annotations
@SuppressWarnings:Immutable
rowKeyToIndexback to summary
private final ImmutableMap<R, Integer> rowKeyToIndex
rowMapback to summary
private final ImmutableMap<R, ImmutableMap<C, V>> rowMap
valuesback to summary
private final @Nullable V[][] values

Hides com.google.common.collect.AbstractTable.values.

Annotations
@SuppressWarnings:Immutable

Constructor Detail

DenseImmutableTableback to summary
pack-priv DenseImmutableTable(ImmutableList<Table.Cell<R, C, V>> cellList, ImmutableSet<R> rowSpace, ImmutableSet<C> columnSpace)

Method Detail

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
getback to summary
public V get(Object rowKey, Object columnKey)

Overrides com.google.common.collect.AbstractTable.get.

Implements com.google.common.collect.Table.get.

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

Returns the value corresponding to the given row and column keys, or null if no such mapping exists.

Parameters
rowKey:Object

key of row to search for

columnKey:Object

key of column to search for

Annotations
@Override
@CheckForNull
getCellback to summary
pack-priv Table.Cell<R, C, V> getCell(int index)

Implements abstract com.google.common.collect.RegularImmutableTable.getCell.

Annotations
@Override
getValueback to summary
pack-priv V getValue(int index)

Implements abstract com.google.common.collect.RegularImmutableTable.getValue.

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.RegularImmutableTable.writeReplace.

Annotations
@Override
@J2ktIncompatible
@GwtIncompatible
com.google.common.collect back to summary

private final Class DenseImmutableTable.Column

extends DenseImmutableTable.ImmutableArrayMap<R, V>
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final int

Constructor Summary

AccessConstructor and Description
pack-priv
Column(int columnIndex)

Method Summary

Modifier and TypeMethod and Description
pack-priv V
pack-priv boolean
pack-priv ImmutableMap<R, Integer>
pack-priv Object
Inherited from com.google.common.collect.DenseImmutableTable.ImmutableArrayMap:
createKeySetentryIteratorgetgetKeysize

Field Detail

columnIndexback to summary
private final int columnIndex

Constructor Detail

Columnback to summary
pack-priv Column(int columnIndex)

Method Detail

getValueback to summary
pack-priv V getValue(int keyIndex)

Implements abstract com.google.common.collect.DenseImmutableTable.ImmutableArrayMap.getValue.

Annotations
@Override
@CheckForNull
isPartialViewback to summary
pack-priv boolean isPartialView()

Implements abstract com.google.common.collect.ImmutableMap.isPartialView.

Annotations
@Override
keyToIndexback to summary
pack-priv ImmutableMap<R, Integer> keyToIndex()

Implements abstract com.google.common.collect.DenseImmutableTable.ImmutableArrayMap.keyToIndex.

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

Overrides com.google.common.collect.DenseImmutableTable.ImmutableArrayMap.writeReplace.

Doc from com.google.common.collect.ImmutableMap.writeReplace.

Returns a serializable form of this object. Non-public subclasses should not override this method. Publicly-accessible subclasses must override this method and should return a subclass of SerializedForm whose readResolve() method returns objects of the subclass type.

Annotations
@SuppressWarnings:RedundantOverride
@Override
@J2ktIncompatible
@GwtIncompatible
com.google.common.collect back to summary

private final Class DenseImmutableTable.ColumnMap

extends DenseImmutableTable.ImmutableArrayMap<C, ImmutableMap<R, V>>
Class Inheritance
Annotations
@WeakOuter

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv ImmutableMap<R, V>
pack-priv boolean
pack-priv ImmutableMap<C, Integer>
pack-priv Object
Inherited from com.google.common.collect.DenseImmutableTable.ImmutableArrayMap:
createKeySetentryIteratorgetgetKeysize

Constructor Detail

ColumnMapback to summary
private ColumnMap()

Method Detail

getValueback to summary
pack-priv ImmutableMap<R, V> getValue(int keyIndex)

Implements abstract com.google.common.collect.DenseImmutableTable.ImmutableArrayMap.getValue.

Annotations
@Override
isPartialViewback to summary
pack-priv boolean isPartialView()

Implements abstract com.google.common.collect.ImmutableMap.isPartialView.

Annotations
@Override
keyToIndexback to summary
pack-priv ImmutableMap<C, Integer> keyToIndex()

Implements abstract com.google.common.collect.DenseImmutableTable.ImmutableArrayMap.keyToIndex.

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

Overrides com.google.common.collect.DenseImmutableTable.ImmutableArrayMap.writeReplace.

Doc from com.google.common.collect.ImmutableMap.writeReplace.

Returns a serializable form of this object. Non-public subclasses should not override this method. Publicly-accessible subclasses must override this method and should return a subclass of SerializedForm whose readResolve() method returns objects of the subclass type.

Annotations
@SuppressWarnings:RedundantOverride
@Override
@J2ktIncompatible
@GwtIncompatible
com.google.common.collect back to summary

private abstract Class DenseImmutableTable.ImmutableArrayMap<K, V>

extends ImmutableMap.IteratorBasedImmutableMap<K, V>
Class Inheritance
Known Direct Subclasses
com.google.common.collect.DenseImmutableTable.Row, com.google.common.collect.DenseImmutableTable.Column, com.google.common.collect.DenseImmutableTable.RowMap, com.google.common.collect.DenseImmutableTable.ColumnMap

An immutable map implementation backed by an indexed nullable array.

Field Summary

Modifier and TypeField and Description
private final int

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv ImmutableSet<K>
pack-priv UnmodifiableIterator<Map.Entry<K, V>>
public V
get(Object
the key whose associated value is to be returned
key
)

Implements abstract com.google.common.collect.ImmutableMap.get.

Implements java.util.Map.get.

Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.
pack-priv K
getKey(int index)

pack-priv abstract V
getValue(int keyIndex)

private boolean
pack-priv abstract ImmutableMap<K, Integer>
public int
size()

Implements java.util.Map.size.

Returns the number of key-value mappings in this map.
pack-priv Object
Inherited from com.google.common.collect.ImmutableMap.IteratorBasedImmutableMap:
createEntrySetcreateValuesentrySpliterator

Field Detail

sizeback to summary
private final int size

Constructor Detail

ImmutableArrayMapback to summary
pack-priv ImmutableArrayMap(int size)

Method Detail

createKeySetback to summary
pack-priv ImmutableSet<K> createKeySet()

Overrides com.google.common.collect.ImmutableMap.IteratorBasedImmutableMap.createKeySet.

Annotations
@Override
entryIteratorback to summary
pack-priv UnmodifiableIterator<Map.Entry<K, V>> entryIterator()

Implements abstract com.google.common.collect.ImmutableMap.IteratorBasedImmutableMap.entryIterator.

Annotations
@Override
getback to summary
public V get(Object key)

Implements abstract com.google.common.collect.ImmutableMap.get.

Implements java.util.Map.get.

Doc from java.util.Map.get.

Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.

More formally, if this map contains a mapping from a key k to a value v such that Objects.equals(key, k), then this method returns v; otherwise it returns null. (There can be at most one such mapping.)

If this map permits null values, then a return value of null does not necessarily indicate that the map contains no mapping for the key; it's also possible that the map explicitly maps the key to null. The containsKey operation may be used to distinguish these two cases.

Parameters
key:Object

the key whose associated value is to be returned

Returns:V

the value to which the specified key is mapped, or null if this map contains no mapping for the key

Annotations
@Override
@CheckForNull
getKeyback to summary
pack-priv K getKey(int index)
getValueback to summary
pack-priv abstract V getValue(int keyIndex)
Annotations
@CheckForNull
isFullback to summary
private boolean isFull()
keyToIndexback to summary
pack-priv abstract ImmutableMap<K, Integer> keyToIndex()
sizeback to summary
public int size()

Implements java.util.Map.size.

Doc from java.util.Map.size.

Returns the number of key-value mappings in this map. If the map contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.

Returns:int

the number of key-value mappings in this map

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

Overrides com.google.common.collect.ImmutableMap.IteratorBasedImmutableMap.writeReplace.

Doc from com.google.common.collect.ImmutableMap.writeReplace.

Returns a serializable form of this object. Non-public subclasses should not override this method. Publicly-accessible subclasses must override this method and should return a subclass of SerializedForm whose readResolve() method returns objects of the subclass type.

Annotations
@SuppressWarnings:RedundantOverride
@J2ktIncompatible
@Override
@GwtIncompatible
com.google.common.collect back to summary

private final Class DenseImmutableTable.Row

extends DenseImmutableTable.ImmutableArrayMap<C, V>
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final int

Constructor Summary

AccessConstructor and Description
pack-priv
Row(int rowIndex)

Method Summary

Modifier and TypeMethod and Description
pack-priv V
pack-priv boolean
pack-priv ImmutableMap<C, Integer>
pack-priv Object
Inherited from com.google.common.collect.DenseImmutableTable.ImmutableArrayMap:
createKeySetentryIteratorgetgetKeysize

Field Detail

rowIndexback to summary
private final int rowIndex

Constructor Detail

Rowback to summary
pack-priv Row(int rowIndex)

Method Detail

getValueback to summary
pack-priv V getValue(int keyIndex)

Implements abstract com.google.common.collect.DenseImmutableTable.ImmutableArrayMap.getValue.

Annotations
@Override
@CheckForNull
isPartialViewback to summary
pack-priv boolean isPartialView()

Implements abstract com.google.common.collect.ImmutableMap.isPartialView.

Annotations
@Override
keyToIndexback to summary
pack-priv ImmutableMap<C, Integer> keyToIndex()

Implements abstract com.google.common.collect.DenseImmutableTable.ImmutableArrayMap.keyToIndex.

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

Overrides com.google.common.collect.DenseImmutableTable.ImmutableArrayMap.writeReplace.

Doc from com.google.common.collect.ImmutableMap.writeReplace.

Returns a serializable form of this object. Non-public subclasses should not override this method. Publicly-accessible subclasses must override this method and should return a subclass of SerializedForm whose readResolve() method returns objects of the subclass type.

Annotations
@SuppressWarnings:RedundantOverride
@Override
@J2ktIncompatible
@GwtIncompatible
com.google.common.collect back to summary

private final Class DenseImmutableTable.RowMap

extends DenseImmutableTable.ImmutableArrayMap<R, ImmutableMap<C, V>>
Class Inheritance
Annotations
@WeakOuter

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv ImmutableMap<C, V>
pack-priv boolean
pack-priv ImmutableMap<R, Integer>
pack-priv Object
Inherited from com.google.common.collect.DenseImmutableTable.ImmutableArrayMap:
createKeySetentryIteratorgetgetKeysize

Constructor Detail

RowMapback to summary
private RowMap()

Method Detail

getValueback to summary
pack-priv ImmutableMap<C, V> getValue(int keyIndex)

Implements abstract com.google.common.collect.DenseImmutableTable.ImmutableArrayMap.getValue.

Annotations
@Override
isPartialViewback to summary
pack-priv boolean isPartialView()

Implements abstract com.google.common.collect.ImmutableMap.isPartialView.

Annotations
@Override
keyToIndexback to summary
pack-priv ImmutableMap<R, Integer> keyToIndex()

Implements abstract com.google.common.collect.DenseImmutableTable.ImmutableArrayMap.keyToIndex.

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

Overrides com.google.common.collect.DenseImmutableTable.ImmutableArrayMap.writeReplace.

Doc from com.google.common.collect.ImmutableMap.writeReplace.

Returns a serializable form of this object. Non-public subclasses should not override this method. Publicly-accessible subclasses must override this method and should return a subclass of SerializedForm whose readResolve() method returns objects of the subclass type.

Annotations
@SuppressWarnings:RedundantOverride
@Override
@J2ktIncompatible
@GwtIncompatible