MutableTable

interface MutableTable<R : Any, C : Any, V : Any> : Table<R, C, V>

A mutable table that maps a pair of keys (row key, column key) to a value.

Parameters

R

the type of row keys

C

the type of column keys

V

the type of values

Inheritors

Properties

Link copied to clipboard
abstract val cellSet: Set<Table.Cell<R, C, V>>

Returns a set of all row key / column key / value triplets.

Link copied to clipboard
abstract val columnKeySet: Set<C>

Returns a set of column keys that have one or more values in the table.

Link copied to clipboard
abstract val columnMap: Map<C, Map<R, V>>

Returns a view that associates each column key with the corresponding map from row keys to values.

Link copied to clipboard
abstract val rowKeySet: Set<R>

Returns a set of row keys that have one or more values in the table.

Link copied to clipboard
abstract val rowMap: Map<R, Map<C, V>>

Returns a view that associates each row key with the corresponding map from column keys to values.

Link copied to clipboard
abstract val size: Int

Returns the number of row key / column key / value mappings in the table.

Link copied to clipboard
abstract val values: Collection<V>

Returns a collection of all values in the table.

Functions

Link copied to clipboard
abstract fun clear()

Removes all mappings from the table.

Link copied to clipboard
abstract fun column(columnKey: C): Map<R, V>

Returns a view of all mappings that have the given column key.

Link copied to clipboard
abstract fun contains(rowKey: R, columnKey: C): Boolean

Returns true if the table contains a mapping with the specified row and column keys.

Link copied to clipboard
abstract fun containsColumn(columnKey: C): Boolean

Returns true if the table contains a mapping with the specified column key.

Link copied to clipboard
abstract fun containsRow(rowKey: R): Boolean

Returns true if the table contains a mapping with the specified row key.

Link copied to clipboard
abstract fun containsValue(value: V): Boolean

Returns true if the table contains the specified value.

Link copied to clipboard
abstract fun get(rowKey: R, columnKey: C): V?

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

Link copied to clipboard
abstract fun isEmpty(): Boolean

Returns true if the table contains no mappings.

Link copied to clipboard
abstract fun put(rowKey: R, columnKey: C, value: V): V?

Associates the specified value with the specified keys.

Link copied to clipboard
abstract fun putAll(table: Table<R, C, V>)

Adds all mappings from the specified table to this table.

Link copied to clipboard
abstract fun remove(rowKey: R, columnKey: C): V?

Removes the mapping, if any, associated with the given keys.

Link copied to clipboard
abstract fun removeColumn(columnKey: C): Boolean

Removes all mappings that have the given column key.

Link copied to clipboard
abstract fun removeRow(rowKey: R): Boolean

Removes all mappings that have the given row key.

Link copied to clipboard
abstract fun row(rowKey: R): Map<C, V>

Returns a view of all mappings that have the given row key.