Class ObjectTable
- java.lang.Object
-
- org.pentaho.reporting.libraries.base.util.ObjectTable
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
GenericObjectTable
public class ObjectTable extends java.lang.Object implements java.io.SerializableA lookup table for objects. This implementation is not synchronized, it is up to the caller to synchronize it properly.- Author:
- Thomas Morgner
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ObjectTable()Creates a new table.ObjectTable(int increment)Creates a new table.ObjectTable(int rowIncrement, int colIncrement)Creates a new table.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Clears the table.voidclearRow(int row)Clears the row by removing the array that stores the row-data.voidensureCapacity(int row, int column)Ensures that there is storage capacity for the specified item.booleanequals(java.lang.Object o)Tests this paint table for equality with another object (typically also anObjectTable).intgetColumnCount()Returns the number of columns in the table.intgetColumnIncrement()Returns the column size increment.intgetRowCount()Returns the number of rows in the table.intgetRowIncrement()Returns the row size increment.inthashCode()Returns a hash code value for the object.
-
-
-
Constructor Detail
-
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 Detail
-
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
public boolean equals(java.lang.Object o)
Tests this paint table for equality with another object (typically also anObjectTable).- Overrides:
equalsin classjava.lang.Object- Parameters:
o- the other object.- Returns:
- A boolean.
-
hashCode
public int hashCode()
Returns a hash code value for the object.- Overrides:
hashCodein classjava.lang.Object- Returns:
- the hashcode
-
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.
-
-