|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.tagtraum.perf.datastructures.AbstractMatrix
Base class for Matrix
implementations.
Constructor Summary | |
AbstractMatrix(int cols,
int rows)
Creates a matrix. |
Method Summary | |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
|
int |
columns()
The number of columns this matrix has. |
boolean |
equals(java.lang.Object obj)
Dummy, better than nothing implementation for hashcode. |
int |
hashCode()
Dummy, better than nothing implementation for hashcode. |
boolean |
isGrowable()
Indicates whether this matrix can grow or has a fixed size. |
protected void |
rangeCheck(int col,
int row)
To be called by subclasses to check whether col and row are in range. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
|
int |
rows()
The number of rows this matrix has. |
protected void |
setColumns(int cols)
|
protected void |
setGrowable(boolean growable)
|
protected void |
setRows(int rows)
|
java.lang.String |
toString()
Creates a string representation of this matrix. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.tagtraum.perf.datastructures.Matrix |
get, remove, set |
Constructor Detail |
public AbstractMatrix(int cols, int rows)
cols
- number of cols this matrix should have.rows
- number of rows this matrix should have.
java.lang.IllegalArgumentException
- if cols or rows is less than zerorows()
,
columns()
Method Detail |
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
public boolean isGrowable()
Matrix
isGrowable
in interface Matrix
protected void setGrowable(boolean growable)
public int columns()
Matrix
columns
in interface Matrix
public int rows()
Matrix
rows
in interface Matrix
protected void setColumns(int cols)
protected void setRows(int rows)
protected void rangeCheck(int col, int row)
col
- columnrow
- row
java.lang.IndexOutOfBoundsException
- if col or row are less than zero or greater than
the size of this matrixrows()
,
columns()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |