T - The value type.public interface KeyedValues2D<T> extends Values2D<T>
rowKey and the
columnKey). Any instance of Comparable can be
used as a key (String objects are instances of
Comparable, making them convenient key objects).| Modifier and Type | Method and Description |
|---|---|
int |
getColumnIndex(java.lang.Comparable<?> columnKey)
Returns the index of the specified key, or
-1 if there
is no such key. |
java.lang.Comparable<?> |
getColumnKey(int columnIndex)
Returns the column key with the specified index.
|
java.util.List<java.lang.Comparable<?>> |
getColumnKeys()
Returns a list of the column keys (the order is significant, since data
values can be accessed by index as well as by key).
|
int |
getRowIndex(java.lang.Comparable<?> rowKey)
Returns the index of the specified key, or
-1 if there
is no such key. |
java.lang.Comparable<?> |
getRowKey(int rowIndex)
Returns the row key with the specified index.
|
java.util.List<java.lang.Comparable<?>> |
getRowKeys()
Returns a list of the row keys (the order is significant, since data
values can be accessed by index as well as by key).
|
T |
getValue(java.lang.Comparable<?> rowKey,
java.lang.Comparable<?> columnKey)
Returns the value (possibly
null) associated with the
specified keys. |
getColumnCount, getDoubleValue, getRowCount, getValuejava.lang.Comparable<?> getRowKey(int rowIndex)
rowIndex - the row index.java.lang.Comparable<?> getColumnKey(int columnIndex)
columnIndex - the index.int getRowIndex(java.lang.Comparable<?> rowKey)
-1 if there
is no such key.rowKey - the row key (null not permitted).-1.int getColumnIndex(java.lang.Comparable<?> columnKey)
-1 if there
is no such key.columnKey - the column key (null not permitted).-1.java.util.List<java.lang.Comparable<?>> getRowKeys()
java.util.List<java.lang.Comparable<?>> getColumnKeys()
T getValue(java.lang.Comparable<?> rowKey, java.lang.Comparable<?> columnKey)
null) associated with the
specified keys. If either or both of the keys is not defined in this
data structure, a runtime exception will be thrown.rowKey - the row key (null not permitted).columnKey - the column key (null not permitted).null).