uchicago.src.collection
Class NewMatrix
java.lang.Object
uchicago.src.collection.NewMatrix
- All Implemented Interfaces:
- BaseMatrix
public class NewMatrix
- extends java.lang.Object
- implements BaseMatrix
|
Constructor Summary |
NewMatrix(int cols,
int rows)
Cols, rows instead of row cols because intended to work with
xSize and ySize dimensions. |
|
Method Summary |
java.lang.Object |
get(int col,
int row)
|
int |
getNumCols()
|
int |
getNumRows()
|
void |
put(int col,
int row,
java.lang.Object obj)
|
java.lang.Object |
remove(int col,
int row)
|
int |
size()
|
void |
trim()
Releases any superfulous memory. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NewMatrix
public NewMatrix(int cols,
int rows)
- Cols, rows instead of row cols because intended to work with
xSize and ySize dimensions.
get
public java.lang.Object get(int col,
int row)
- Specified by:
get in interface BaseMatrix
put
public void put(int col,
int row,
java.lang.Object obj)
- Specified by:
put in interface BaseMatrix
remove
public java.lang.Object remove(int col,
int row)
- Specified by:
remove in interface BaseMatrix
getNumRows
public int getNumRows()
- Specified by:
getNumRows in interface BaseMatrix
getNumCols
public int getNumCols()
- Specified by:
getNumCols in interface BaseMatrix
size
public int size()
- Specified by:
size in interface BaseMatrix
trim
public void trim()
- Releases any superfulous memory. The default implementation here
does nothing.
- Specified by:
trim in interface BaseMatrix