Class ByteTable
java.lang.Object
org.pentaho.reporting.libraries.fonts.tools.ByteTable
- All Implemented Interfaces:
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear
(byte value) Clears the table.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
).byte
getByte
(int row, int column, byte defaultValue) Returns the object from a particular cell in the table.int
Returns the number of columns in the table.protected byte[][]
getData()
int
Returns the number of rows in the table.int
hashCode()
Returns a hash code value for the object.void
setByte
(int row, int column, byte object) Sets the object for a cell in the table.
-
Constructor Details
-
ByteTable
public ByteTable(int rows, int cols) Creates a new table.- Parameters:
rows
- the inital number of rows.cols
- the initial number of columns.
-
-
Method Details
-
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.
-
getByte
public byte getByte(int row, int column, byte defaultValue) 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).column
- the column index (zero-based).- Returns:
- The object.
-
setByte
public void setByte(int row, int column, byte object) Sets the object for a cell in the table. The table is expanded if necessary.- Parameters:
row
- the row index (zero-based).column
- the column index (zero-based).object
- the object.
-
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(byte value) Clears the table. -
getData
protected byte[][] getData()
-