org.pentaho.reporting.libraries.base.util

Class ObjectTable

public class ObjectTable extends Object implements Serializable

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
ObjectTable()
Creates a new table.
ObjectTable(int increment)
Creates a new table.
ObjectTable(int rowIncrement, int colIncrement)
Creates a new table.
Method Summary
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(Object o)
Tests this paint table for equality with another object (typically also an ObjectTable).
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

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.

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.

equals

public boolean equals(Object o)
Tests this paint table for equality with another object (typically also an ObjectTable).

Parameters: o the other object.

Returns: A boolean.

getColumnCount

public int getColumnCount()
Returns the number of columns in the table.

Returns: The column count.

getColumnIncrement

public int getColumnIncrement()
Returns the column size increment.

Returns: the increment.

getRowCount

public int getRowCount()
Returns the number of rows in the table.

Returns: The row count.

getRowIncrement

public int getRowIncrement()
Returns the row size increment.

Returns: the increment.

hashCode

public int hashCode()
Returns a hash code value for the object.

Returns: the hashcode