| java.lang.Object org.jfree.util.ObjectTable
ObjectTable | public class ObjectTable implements Serializable(Code) | | A lookup table for objects. This implementation is not synchronized, it is up
to the caller to synchronize it properly.
author: Thomas Morgner |
Constructor Summary | |
public | ObjectTable() Creates a new table. | public | ObjectTable(int increment) Creates a new table. | public | ObjectTable(int rowIncrement, int colIncrement) Creates a new table. |
Method Summary | |
public void | clear() Clears the table. | protected void | copyColumn(int oldColumn, int newColumn) Copys the contents of the old column to the new column. | protected void | copyRow(int oldRow, int newRow) Copys the contents of the old row to the new row. | public void | ensureCapacity(int row, int column) Ensures that there is storage capacity for the specified item. | protected void | ensureRowCapacity(int row) Checks that there is storage capacity for the specified row and resizes
if necessary. | public boolean | equals(Object o) Tests this paint table for equality with another object (typically also
an ObjectTable ).
Parameters: o - the other object. | public int | getColumnCount() Returns the number of columns in the table. | public int | getColumnIncrement() Returns the column size increment. | protected Object[][] | getData() | protected Object | getObject(int row, int column) Returns the object from a particular cell in the table. | public int | getRowCount() Returns the number of rows in the table. | public int | getRowIncrement() Returns the row size increment. | public int | hashCode() Returns a hash code value for the object. | protected Object | readSerializedData(ObjectInputStream stream) Handles the deserialization of a single element of the table.
Parameters: stream - the object input stream from which to read the object. | protected void | setData(Object[][] data, int colCount) | protected void | setObject(int row, int column, Object object) Sets the object for a cell in the table. | protected void | writeSerializedData(ObjectOutputStream stream, Object o) Handles the serialization of an single element of this table. |
ObjectTable | public ObjectTable()(Code) | | Creates a new table.
|
ObjectTable | public ObjectTable(int increment)(Code) | | Creates a new table.
Parameters: increment - the row and column size increment. |
ObjectTable | public ObjectTable(int rowIncrement, int colIncrement)(Code) | | Creates a new table.
Parameters: rowIncrement - the row size increment. Parameters: colIncrement - the column size increment. |
clear | public void clear()(Code) | | Clears the table.
|
copyColumn | protected void copyColumn(int oldColumn, int newColumn)(Code) | | Copys the contents of the old column to the new column.
Parameters: oldColumn - the index of the old (source) column Parameters: newColumn - the index of the new column |
copyRow | protected void copyRow(int oldRow, int newRow)(Code) | | Copys the contents of the old row to the new row. This uses raw access to
the data and is remarkably faster than manual copying.
Parameters: oldRow - the index of the old row Parameters: newRow - the index of the new row |
ensureCapacity | public void ensureCapacity(int row, int column)(Code) | | Ensures that there is storage capacity for the specified item.
Parameters: row - the row index. Parameters: column - the column index. |
ensureRowCapacity | protected void ensureRowCapacity(int row)(Code) | | Checks that there is storage capacity for the specified row and resizes
if necessary.
Parameters: row - the row index. |
equals | public boolean equals(Object o)(Code) | | Tests this paint table for equality with another object (typically also
an ObjectTable ).
Parameters: o - the other object. A boolean. |
getColumnCount | public int getColumnCount()(Code) | | Returns the number of columns in the table.
The column count. |
getColumnIncrement | public int getColumnIncrement()(Code) | | Returns the column size increment.
the increment. |
getObject | protected Object getObject(int row, int column)(Code) | | Returns the object from a particular cell in the table. Returns null, if
there is no object at the given position.
Note: throws IndexOutOfBoundsException if row or column is negative.
Parameters: row - the row index (zero-based). Parameters: column - the column index (zero-based). The object. |
getRowCount | public int getRowCount()(Code) | | Returns the number of rows in the table.
The row count. |
getRowIncrement | public int getRowIncrement()(Code) | | Returns the row size increment.
the increment. |
hashCode | public int hashCode()(Code) | | Returns a hash code value for the object.
the hashcode |
setData | protected void setData(Object[][] data, int colCount)(Code) | | |
setObject | protected void setObject(int row, int column, Object object)(Code) | | Sets the object for a cell in the table. The table is expanded if
necessary.
Parameters: row - the row index (zero-based). Parameters: column - the column index (zero-based). Parameters: object - the object. |
writeSerializedData | protected void writeSerializedData(ObjectOutputStream stream, Object o) throws IOException(Code) | | Handles the serialization of an single element of this table.
Parameters: stream - the stream which should write the object Parameters: o - the object that should be serialized throws: IOException - if an IO error occured |
|
|