Package jadex.tools.comanalyzer.chart
Class KeyedListsTable
- java.lang.Object
- 
- jadex.tools.comanalyzer.chart.KeyedListsTable
 
- 
- All Implemented Interfaces:
- java.io.Serializable,- java.lang.Cloneable,- org.jfree.data.KeyedValues2D,- org.jfree.data.Values2D
 
 public class KeyedListsTable extends java.lang.Object implements org.jfree.data.KeyedValues2D, java.lang.Cloneable, java.io.SerializableA data structure that stores lists, where each list is associated with two keys (a 'row' key and a 'column' key).- See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description KeyedListsTable()Creates a new table.KeyedListsTable(boolean sortRowKeys)Creates a new table.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddToList(java.lang.Object element, java.lang.Comparable rowKey, java.lang.Comparable columnKey)Adds a element to a list.voidclear()Clears all the data and associated keys.intgetColumnCount()Returns the column count.intgetColumnIndex(java.lang.Comparable key)Returns the column index for a given key.java.lang.ComparablegetColumnKey(int column)Returns the key for a given column.java.util.ListgetColumnKeys()Returns the column keys in an unmodifiable list.java.util.ListgetList(java.lang.Comparable rowKey, java.lang.Comparable columnKey)Returns the List for the given row and column keys.intgetRowCount()Returns the row count.intgetRowIndex(java.lang.Comparable key)Returns the row index for a given key.java.lang.ComparablegetRowKey(int row)Returns the key for a given row.java.util.ListgetRowKeys()Returns the row keys in an unmodifiable list.java.lang.NumbergetValue(int row, int column)Returns the value for a given row and column.java.lang.NumbergetValue(java.lang.Comparable rowKey, java.lang.Comparable columnKey)Returns the value for the given row and column keys.voidremoveColumn(int columnIndex)Removes a column.voidremoveColumn(java.lang.Comparable columnKey)Removes a column.voidremoveFromList(java.lang.Object element, java.lang.Comparable rowKey, java.lang.Comparable columnKey)Removes an element from the table.voidremoveList(java.lang.Comparable rowKey, java.lang.Comparable columnKey)Removes a value from the table by setting it tonull.voidremoveRow(int rowIndex)Removes a row.voidremoveRow(java.lang.Comparable rowKey)Removes a row.voidsetList(java.util.List list, java.lang.Comparable rowKey, java.lang.Comparable columnKey)Adds or updates a list.
 
- 
- 
- 
Method Detail- 
getListpublic java.util.List getList(java.lang.Comparable rowKey, java.lang.Comparable columnKey)Returns the List for the given row and column keys.- Parameters:
- rowKey- the row key (- nullnot permitted).
- columnKey- the column key (- nullnot permitted).
- Returns:
- The List (possibly null).
 
 - 
setListpublic void setList(java.util.List list, java.lang.Comparable rowKey, java.lang.Comparable columnKey)Adds or updates a list.- Parameters:
- list- the list (- nullpermitted).
- rowKey- the row key (- nullnot permitted).
- columnKey- the column key (- nullnot permitted).
 
 - 
addToListpublic void addToList(java.lang.Object element, java.lang.Comparable rowKey, java.lang.Comparable columnKey)Adds a element to a list.- Parameters:
- element- the element to add (- nullpermitted).
- rowKey- the row key (- nullnot permitted).
- columnKey- the column key (- nullnot permitted).
 
 - 
removeListpublic void removeList(java.lang.Comparable rowKey, java.lang.Comparable columnKey)Removes a value from the table by setting it tonull. If all the values in the specified row and/or column are nownull, the row and/or column is removed from the table.- Parameters:
- rowKey- the row key (- nullnot permitted).
- columnKey- the column key (- nullnot permitted).
 
 - 
removeFromListpublic void removeFromList(java.lang.Object element, java.lang.Comparable rowKey, java.lang.Comparable columnKey)Removes an element from the table. If the list is empty, it is set tonull. If all the values in the specified row and/or column are nownull, the row and/or column is removed from the table.- Parameters:
- rowKey- the row key (- nullnot permitted).
- columnKey- the column key (- nullnot permitted).
 
 - 
removeRowpublic void removeRow(int rowIndex) Removes a row.- Parameters:
- rowIndex- the row index.
 
 - 
removeRowpublic void removeRow(java.lang.Comparable rowKey) Removes a row. If all values of any column arenull, the column(s) is/are removed.- Parameters:
- rowKey- the row key (- nullnot permitted).
 
 - 
removeColumnpublic void removeColumn(int columnIndex) Removes a column.- Parameters:
- columnIndex- the column index.
 
 - 
removeColumnpublic void removeColumn(java.lang.Comparable columnKey) Removes a column.- Parameters:
- columnKey- the column key (- nullnot permitted).
 
 - 
clearpublic void clear() Clears all the data and associated keys.
 - 
getRowCountpublic int getRowCount() Returns the row count.- Specified by:
- getRowCountin interface- org.jfree.data.Values2D
- Returns:
- The row count.
 
 - 
getColumnCountpublic int getColumnCount() Returns the column count.- Specified by:
- getColumnCountin interface- org.jfree.data.Values2D
- Returns:
- The column count.
 
 - 
getValuepublic java.lang.Number getValue(int row, int column)Returns the value for a given row and column.- Specified by:
- getValuein interface- org.jfree.data.Values2D
- Parameters:
- row- the row index.
- column- the column index.
- Returns:
- The value.
 
 - 
getValuepublic java.lang.Number getValue(java.lang.Comparable rowKey, java.lang.Comparable columnKey)Returns the value for the given row and column keys.- Specified by:
- getValuein interface- org.jfree.data.KeyedValues2D
- Parameters:
- rowKey- the row key (- nullnot permitted).
- columnKey- the column key (- nullnot permitted).
- Returns:
- The value (possibly null).
 
 - 
getRowKeypublic java.lang.Comparable getRowKey(int row) Returns the key for a given row.- Specified by:
- getRowKeyin interface- org.jfree.data.KeyedValues2D
- Parameters:
- row- the row index (in the range 0 to- getRowCount()- 1).
- Returns:
- The row key.
 
 - 
getRowIndexpublic int getRowIndex(java.lang.Comparable key) Returns the row index for a given key.- Specified by:
- getRowIndexin interface- org.jfree.data.KeyedValues2D
- Parameters:
- key- the key (- nullnot permitted).
- Returns:
- The row index.
 
 - 
getRowKeyspublic java.util.List getRowKeys() Returns the row keys in an unmodifiable list.- Specified by:
- getRowKeysin interface- org.jfree.data.KeyedValues2D
- Returns:
- The row keys.
 
 - 
getColumnKeypublic java.lang.Comparable getColumnKey(int column) Returns the key for a given column.- Specified by:
- getColumnKeyin interface- org.jfree.data.KeyedValues2D
- Parameters:
- column- the column (in the range 0 to- getColumnCount()- 1).
- Returns:
- The key.
 
 - 
getColumnIndexpublic int getColumnIndex(java.lang.Comparable key) Returns the column index for a given key.- Specified by:
- getColumnIndexin interface- org.jfree.data.KeyedValues2D
- Parameters:
- key- the key (- nullnot permitted).
- Returns:
- The column index.
 
 - 
getColumnKeyspublic java.util.List getColumnKeys() Returns the column keys in an unmodifiable list.- Specified by:
- getColumnKeysin interface- org.jfree.data.KeyedValues2D
- Returns:
- The column keys.
 
 
- 
 
-