Table implementation backed by a map that associates row keys with column key / value
secondary maps. This class provides rapid access to records by the row key alone or by both keys,
but not by just the column key.
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.
| Modifier and Type | Class and Description |
|---|---|
| private class | |
| private class | |
| private class | |
| private class | |
| private class | |
| pack-priv class | |
| pack-priv class | |
| private abstract class | StandardTable.
Abstract set whose |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Map | |
| private transient Set | |
| private transient StandardTable | |
| pack-priv final Supplier | |
| private transient Map | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv Iterator | |
| public Set | cellSet()
Overrides com. Implements com. |
| pack-priv Spliterator | |
| public void | clear()
Overrides com. Implements com. |
| public Map | column(C
key of column to search for in the table columnKey)Implements com. |
| public Set | columnKeySet()
Overrides com. Implements com. |
| public Map | columnMap()
Implements com. |
| public boolean | contains(Object
key of row to search for rowKey, Object key of column to search for columnKey)Overrides com. Implements com. true if the table contains a mapping with the specified row and column keys.
|
| public boolean | containsColumn(Object
key of column to search for columnKey)Overrides com. Implements com. true if the table contains a mapping with the specified column.
|
| private boolean | |
| public boolean | containsRow(Object
key of row to search for rowKey)Overrides com. Implements com. true if the table contains a mapping with the specified row key.
|
| public boolean | containsValue(Object
value to search for value)Overrides com. Implements com. true if the table contains a mapping with the specified value.
|
| pack-priv Iterator | createColumnKeyIterator()
Creates an iterator that returns each column value with duplicates omitted. |
| pack-priv Map | |
| public V | get(Object
key of row to search for rowKey, Object key of column to search for columnKey)Overrides com. Implements com. null if no such
mapping exists.
|
| private Map | |
| public boolean | isEmpty()
Overrides com. Implements com. true if the table contains no mappings.
|
| public V | put(R
row key that the value should be associated with rowKey, C column key that the value should be associated with columnKey, V value to be associated with the specified keys value)Overrides com. Implements com. |
| public V | remove(Object
row key of mapping to be removed rowKey, Object column key of mapping to be removed columnKey)Overrides com. Implements com. |
| private Map | |
| private boolean | removeMapping(Object rowKey, Object columnKey, Object value)
Remove a row key / column key / value mapping, if present. |
| public Map | row(R
key of row to search for in the table rowKey)Implements com. |
| public Set | rowKeySet()
Overrides com. Implements com. |
| public Map | rowMap()
Implements com. |
| public int | size()
Implements com. |
| public Collection | values()
Overrides com. Implements com. |