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

pack-priv abstract Class RegularImmutableTable<R, C, V>

extends ImmutableTable<R, C, V>
Class Inheritance
Known Direct Subclasses
com.google.common.collect.SparseImmutableTable, com.google.common.collect.DenseImmutableTable
Annotations
@GwtCompatible
@ElementTypesAreNonnullByDefault
Static Imports
com.google.common.base.Preconditions.checkArgument, .Preconditions.checkNotNull

An implementation of ImmutableTable holding an arbitrary number of cells.
Author
Gregory Kick

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
private class

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv final void
checkNoDuplicate(R rowKey, C columnKey, V existingValue, V newValue)

pack-priv final ImmutableSet<Table.Cell<R, C, V>>
pack-priv final ImmutableCollection<V>
pack-priv static <R, C, V> RegularImmutableTable<R, C, V>
forCells(List<Table.Cell<R, C, V>> cells, Comparator<? super R> rowComparator, Comparator<? super C> columnComparator)

pack-priv static <R, C, V> RegularImmutableTable<R, C, V>
forCells(Iterable<Table.Cell<R, C, V>> cells)

private static <R, C, V> RegularImmutableTable<R, C, V>
forCellsInternal(Iterable<Table.Cell<R, C, V>> cells, Comparator<? super R> rowComparator, Comparator<? super C> columnComparator)

pack-priv static <R, C, V> RegularImmutableTable<R, C, V>
forOrderedComponents(ImmutableList<Table.Cell<R, C, V>> cellList, ImmutableSet<R> rowSpace, ImmutableSet<C> columnSpace)

A factory that chooses the most space-efficient representation of the table.

pack-priv abstract Table.Cell<R, C, V>
getCell(int iterationIndex)

pack-priv abstract V
getValue(int iterationIndex)

Inherited from com.google.common.collect.ImmutableTable:
buildercellIteratorcellOfcellSetcellSpliteratorclearcolumncolumnKeySetcolumnMapcontainscontainsValuecopyOfcopyOfcreateSerializedFormofofputputAllremoverowrowKeySetrowMaptoImmutableTabletoImmutableTablevaluesvaluesIteratorwriteReplace

Constructor Detail

RegularImmutableTableback to summary
pack-priv RegularImmutableTable()

Method Detail

checkNoDuplicateback to summary
pack-priv final void checkNoDuplicate(R rowKey, C columnKey, V existingValue, V newValue)
Exceptions
IllegalArgumentException:
if existingValue is not null.
createCellSetback to summary
pack-priv final ImmutableSet<Table.Cell<R, C, V>> createCellSet()

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

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

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

Annotations
@Override
forCellsback to summary
pack-priv static <R, C, V> RegularImmutableTable<R, C, V> forCells(List<Table.Cell<R, C, V>> cells, Comparator<? super R> rowComparator, Comparator<? super C> columnComparator)
forCellsback to summary
pack-priv static <R, C, V> RegularImmutableTable<R, C, V> forCells(Iterable<Table.Cell<R, C, V>> cells)
forCellsInternalback to summary
private static <R, C, V> RegularImmutableTable<R, C, V> forCellsInternal(Iterable<Table.Cell<R, C, V>> cells, Comparator<? super R> rowComparator, Comparator<? super C> columnComparator)
forOrderedComponentsback to summary
pack-priv static <R, C, V> RegularImmutableTable<R, C, V> forOrderedComponents(ImmutableList<Table.Cell<R, C, V>> cellList, ImmutableSet<R> rowSpace, ImmutableSet<C> columnSpace)

A factory that chooses the most space-efficient representation of the table.

getCellback to summary
pack-priv abstract Table.Cell<R, C, V> getCell(int iterationIndex)
getValueback to summary
pack-priv abstract V getValue(int iterationIndex)
com.google.common.collect back to summary

private final Class RegularImmutableTable.CellSet

extends IndexedImmutableSet<Table.Cell<R, C, V>>
Class Inheritance
Annotations
@WeakOuter

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public boolean
contains(Object
element whose presence in this set is to be tested
object
)

Implements abstract com.google.common.collect.ImmutableCollection.contains.

Implements java.util.Set.contains, java.util.Collection.contains.

Returns true if this set contains the specified element.
pack-priv Table.Cell<R, C, V>
pack-priv boolean
isPartialView()

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

Returns true if this immutable collection's implementation contains references to user-created objects that aren't accessible via this collection's methods.
public int
size()

Implements abstract java.util.AbstractCollection.size.

Implements java.util.Set.size, java.util.Collection.size.

Returns the number of elements in this set (its cardinality).
Inherited from com.google.common.collect.IndexedImmutableSet:
copyIntoArraycreateAsListforEachiteratorspliterator

Constructor Detail

CellSetback to summary
private CellSet()

Method Detail

containsback to summary
public boolean contains(Object object)

Implements abstract com.google.common.collect.ImmutableCollection.contains.

Implements java.util.Set.contains, java.util.Collection.contains.

Doc from java.util.Set.contains.

Returns true if this set contains the specified element. More formally, returns true if and only if this set contains an element e such that Objects.equals(o, e).

Parameters
object:Object

element whose presence in this set is to be tested

Returns:boolean

true if this set contains the specified element

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

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

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

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

Doc from com.google.common.collect.ImmutableCollection.isPartialView.

Returns true if this immutable collection's implementation contains references to user-created objects that aren't accessible via this collection's methods. This is generally used to determine whether copyOf implementations should make an explicit copy to avoid memory leaks.

Annotations
@Override
sizeback to summary
public int size()

Implements abstract java.util.AbstractCollection.size.

Implements java.util.Set.size, java.util.Collection.size.

Doc from java.util.Set.size.

Returns the number of elements in this set (its cardinality). If this set contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.

Returns:int

the number of elements in this set (its cardinality)

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

private final Class RegularImmutableTable.Values

extends ImmutableList<V>
Class Inheritance
Annotations
@WeakOuter

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public V
get(int
index of the element to return
index
)

Implements java.util.List.get.

Returns the element at the specified position in this list.
pack-priv boolean
isPartialView()

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

Returns true if this immutable collection's implementation contains references to user-created objects that aren't accessible via this collection's methods.
public int
size()

Implements abstract java.util.AbstractCollection.size.

Implements java.util.List.size, java.util.Collection.size.

Returns the number of elements in this list.
Inherited from com.google.common.collect.ImmutableList:
addaddAllasImmutableListasImmutableListasListbuilderbuilderWithExpectedSizecontainscopyIntoArraycopyOfcopyOfcopyOfcopyOfequalsforEachhashCodeindexOfiteratorlastIndexOflistIteratorlistIteratorofofofofofofofofofofofofofremovereplaceAllreversesetsortsortedCopyOfsortedCopyOfspliteratorsubListsubListUncheckedtoImmutableListwriteReplace

Constructor Detail

Valuesback to summary
private Values()

Method Detail

getback to summary
public V get(int index)

Implements java.util.List.get.

Doc from java.util.List.get.

Returns the element at the specified position in this list.

Parameters
index:int

index of the element to return

Returns:V

the element at the specified position in this list

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

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

Doc from com.google.common.collect.ImmutableCollection.isPartialView.

Returns true if this immutable collection's implementation contains references to user-created objects that aren't accessible via this collection's methods. This is generally used to determine whether copyOf implementations should make an explicit copy to avoid memory leaks.

Annotations
@Override
sizeback to summary
public int size()

Implements abstract java.util.AbstractCollection.size.

Implements java.util.List.size, java.util.Collection.size.

Doc from java.util.List.size.

Returns the number of elements in this list. If this list contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.

Returns:int

the number of elements in this list

Annotations
@Override