|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A generalized interface for a 2 dimensional matrix of Objects.
MatrixIndexOutOfBoundsException
Method Summary | |
java.lang.Object |
get(int column,
int row)
Returns the object at the given location. |
MatrixIterator |
getMatrixIterator()
Returns a MatrixIterator for this matrix. |
int |
height()
Returns the current real height, that is, the largest row number (+1) that contains data. |
java.lang.Object |
remove(int column,
int row)
Sets the object at the specified location to null. |
void |
set(int column,
int row,
java.lang.Object data)
Sets the data at the specific location to the given value. |
int |
sizeHigh()
Get the logical height of the matrix. |
int |
sizeWide()
Get the logical width of the matrix. |
int |
width()
Returns the current real height, that is, the index of the rightmost column that contains data +1. |
Method Detail |
public int width()
public int height()
public int sizeWide()
public int sizeHigh()
public void set(int column, int row, java.lang.Object data) throws MatrixIndexOutOfBoundsException
column
- The column (x position) of the cell to set.row
- The row (y position) of the cell to set.data
- The object to put into the specified cell.
MatrixIndexOutOfBoundsException
- if the index is
not within the boundaries of this matrix.public java.lang.Object get(int column, int row) throws MatrixIndexOutOfBoundsException
column
- The column (x position) of the cell to get.row
- The row (y position) of the cell to get.
MatrixIndexOutOfBoundsException
- if the index is
not within the boundaries of this matrix.public java.lang.Object remove(int column, int row) throws MatrixIndexOutOfBoundsException
column
- The column (x position) of the cell to remove.row
- The row (y position) of the cell to remove.
MatrixIndexOutOfBoundsException
- if the index is
not within the boundaries of this matrix.public MatrixIterator getMatrixIterator()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |