Table using linked hash tables. This guarantees predictable iteration
order of the various views.
The views returned by column, columnKeySet(), and columnMap() have
iterators that don't support remove(). Otherwise, all optional operations are supported.
Null row keys, columns keys, and values are not supported.
Lookups by row key are often faster than lookups by column key, because the data is stored in
a Map<R, Map<C, V>>. A method call like column(columnKey).get(rowKey) still runs
quickly, since the row key is provided. However, column(columnKey).size() takes longer,
since an iteration across all row keys occurs.
Note that this implementation is not synchronized. If multiple threads access this table concurrently and one of the threads modifies the table, it must be synchronized externally.
See the Guava User Guide article on Table.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public static <R, C, V> HashBasedTable | |
| public static <R, C, V> HashBasedTable | create(int
the expected number of distinct row keys expectedRows, int the expected number of column key / value mappings in each row expectedCellsPerRow)Creates an empty |
| public static <R, C, V> HashBasedTable |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides com. | |
| HashBasedTable | back to summary |
|---|---|
| pack-priv HashBasedTable(Map<R, Map<C, V>> backingMap, HashBasedTable. | |
| create | back to summary |
|---|---|
| public static <R, C, V> HashBasedTable Creates an empty | |
| create | back to summary |
|---|---|
| public static <R, C, V> HashBasedTable Creates an empty
| |
| create | back to summary |
|---|---|
| public static <R, C, V> HashBasedTable Creates a
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final int | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public Map |
| expectedSize | back to summary |
|---|---|
| pack-priv final int expectedSize | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| Factory | back to summary |
|---|---|
| pack-priv Factory(int expectedSize) | |
| get | back to summary |
|---|---|
| public Map Implements com. Doc from com. Retrieves an instance of the appropriate type. The returned object may or may not be a new instance, depending on the implementation. | |