Class ObjectTable

java.lang.Object
org.pentaho.reporting.libraries.base.util.ObjectTable
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
GenericObjectTable

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
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new table.
    ObjectTable(int increment)
    Creates a new table.
    ObjectTable(int rowIncrement, int colIncrement)
    Creates a new table.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    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 an ObjectTable).
    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
    Returns a hash code value for the object.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, toString, wait, wait, wait
  • 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

      public boolean equals(Object o)
      Tests this paint table for equality with another object (typically also an ObjectTable).
      Overrides:
      equals in class Object
      Parameters:
      o - the other object.
      Returns:
      A boolean.
    • hashCode

      public int hashCode()
      Returns a hash code value for the object.
      Overrides:
      hashCode in class 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.