Class ObjectTable
java.lang.Object
org.pentaho.reporting.libraries.base.util.ObjectTable
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
GenericObjectTable
A lookup table for objects. This implementation is not synchronized, it is up
to the caller to synchronize it properly.
- Author:
- Thomas Morgner
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new table.ObjectTable
(int increment) Creates a new table.ObjectTable
(int rowIncrement, int colIncrement) Creates a new table. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clears the table.void
clearRow
(int row) Clears the row by removing the array that stores the row-data.void
ensureCapacity
(int row, int column) Ensures that there is storage capacity for the specified item.boolean
Tests this paint table for equality with another object (typically also anObjectTable
).int
Returns the number of columns in the table.int
Returns the column size increment.int
Returns the number of rows in the table.int
Returns the row size increment.int
hashCode()
Returns a hash code value for the object.
-
Constructor Details
-
ObjectTable
public ObjectTable()Creates a new table. -
ObjectTable
public ObjectTable(int increment) Creates a new table.- Parameters:
increment
- the row and column size increment.
-
ObjectTable
public ObjectTable(int rowIncrement, int colIncrement) Creates a new table.- Parameters:
rowIncrement
- the row size increment.colIncrement
- the column size increment.
-
-
Method Details
-
getColumnIncrement
public int getColumnIncrement()Returns the column size increment.- Returns:
- the increment.
-
getRowIncrement
public int getRowIncrement()Returns the row size increment.- Returns:
- the increment.
-
ensureCapacity
public void ensureCapacity(int row, int column) Ensures that there is storage capacity for the specified item.- Parameters:
row
- the row index.column
- the column index.
-
getRowCount
public int getRowCount()Returns the number of rows in the table.- Returns:
- The row count.
-
getColumnCount
public int getColumnCount()Returns the number of columns in the table.- Returns:
- The column count.
-
equals
Tests this paint table for equality with another object (typically also anObjectTable
). -
hashCode
public int hashCode()Returns a hash code value for the object. -
clear
public void clear()Clears the table. -
clearRow
public void clearRow(int row) Clears the row by removing the array that stores the row-data. This reduces the in-memory size of the table at the cost of possibly having to recreate the row-data-array later.- Parameters:
row
- the row to be deleted.
-