Module org.jfree.chart
Package org.jfree.data
Interface KeyedValues2D<R extends Comparable<R>,C extends Comparable<C>>
-
- All Superinterfaces:
Values2D
- All Known Subinterfaces:
BoxAndWhiskerCategoryDataset<R,C>,CategoryDataset<R,C>,GanttCategoryDataset<R,C>,IntervalCategoryDataset<R,C>,KeyedValues2DDataset<R,C>,MultiValueCategoryDataset<R,C>,StatisticalCategoryDataset<R,C>
- All Known Implementing Classes:
DefaultBoxAndWhiskerCategoryDataset,DefaultCategoryDataset,DefaultIntervalCategoryDataset,DefaultKeyedValues2D,DefaultKeyedValues2DDataset,DefaultMultiValueCategoryDataset,DefaultStatisticalCategoryDataset,SlidingCategoryDataset,SlidingGanttCategoryDataset,TaskSeriesCollection
public interface KeyedValues2D<R extends Comparable<R>,C extends Comparable<C>> extends Values2D
An extension of theValues2Dinterface where a unique key is associated with the row and column indices.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetColumnIndex(C key)Returns the column index for a given key.CgetColumnKey(int column)Returns the column key for a given index.List<C>getColumnKeys()Returns the column keys.intgetRowIndex(R key)Returns the row index for a given key.RgetRowKey(int row)Returns the row key for a given index.List<R>getRowKeys()Returns the row keys.NumbergetValue(R rowKey, C columnKey)Returns the value associated with the specified keys.-
Methods inherited from interface org.jfree.data.Values2D
getColumnCount, getRowCount, getValue
-
-
-
-
Method Detail
-
getRowKey
R getRowKey(int row)
Returns the row key for a given index.- Parameters:
row- the row index (zero-based).- Returns:
- The row key.
- Throws:
IndexOutOfBoundsException- ifrowis out of bounds.
-
getRowIndex
int getRowIndex(R key)
Returns the row index for a given key.- Parameters:
key- the row key.- Returns:
- The row index, or a negative value if the key is unrecognised.
-
getRowKeys
List<R> getRowKeys()
Returns the row keys.- Returns:
- The keys.
-
getColumnKey
C getColumnKey(int column)
Returns the column key for a given index.- Parameters:
column- the column index (zero-based).- Returns:
- The column key.
- Throws:
IndexOutOfBoundsException- ifrowis out of bounds.
-
getColumnIndex
int getColumnIndex(C key)
Returns the column index for a given key.- Parameters:
key- the column key.- Returns:
- The column index, or
-1if the key is unrecognised.
-
getColumnKeys
List<C> getColumnKeys()
Returns the column keys.- Returns:
- The keys.
-
getValue
Number getValue(R rowKey, C columnKey)
Returns the value associated with the specified keys.- Parameters:
rowKey- the row key (nullnot permitted).columnKey- the column key (nullnot permitted).- Returns:
- The value.
- Throws:
UnknownKeyException- if either key is not recognised.
-
-