- Type Parameters:
T
- the type of value stored in the grid.
- All Known Subinterfaces:
KeyedValues2D<R,
C, T>
- All Known Implementing Classes:
DefaultKeyedValues2D
public interface Values2D<T>
A generic representation of a two dimensional grid of data values.
-
Method Summary
Modifier and TypeMethodDescriptionint
Returns the number of columns in the grid.double
getDoubleValue
(int rowIndex, int columnIndex) Returns the data value at the specified position as a double primitive, orDouble.NaN
if the value is not an instance ofNumber
.int
Returns the number of rows in the grid.getValue
(int rowIndex, int columnIndex) Returns the data item at the specified position.
-
Method Details
-
getRowCount
int getRowCount()Returns the number of rows in the grid.- Returns:
- The number of rows in the grid.
-
getColumnCount
int getColumnCount()Returns the number of columns in the grid.- Returns:
- The number of columns in the grid.
-
getValue
Returns the data item at the specified position.- Parameters:
rowIndex
- the row index.columnIndex
- the column index.- Returns:
- The data value (possibly
null
).
-
getDoubleValue
Returns the data value at the specified position as a double primitive, orDouble.NaN
if the value is not an instance ofNumber
. Where thegetValue(int, int)
method returnsnull
, this method returnsDouble.NaN
.- Parameters:
rowIndex
- the row index.columnIndex
- the column index.- Returns:
- The data value.
-