T
- the type of a matrix elementpublic class ObjectMatrix<T> extends Matrix<T>
Constructor and Description |
---|
ObjectMatrix(int n,
int m)
Creates a new object matrix of size
n x m and a default element value of null . |
ObjectMatrix(int n,
int m,
T defValue)
Creates a new object matrix of size
n x m . |
Modifier and Type | Method and Description |
---|---|
ObjectMatrix<T> |
clone()
Clones the matrix meaning that it is returned a shallow copy of
this Matrix instance
(the elements themselves are not copied/cloned). |
copy, equals, equals, get, getColumnCount, getRowCount, isInDimension, isSquare, set, set, toString
public ObjectMatrix(int n, int m) throws java.lang.IllegalArgumentException
n
x m
and a default element value of null
.n
- the number of rowsm
- the number of columnsjava.lang.IllegalArgumentException
- < 1
< 1
public ObjectMatrix(int n, int m, T defValue) throws java.lang.IllegalArgumentException
n
x m
.n
- the number of rowsm
- the number of columnsdefValue
- the default element valuejava.lang.IllegalArgumentException
- < 1
< 1
public ObjectMatrix<T> clone()
Matrix
this
Matrix
instance
(the elements themselves are not copied/cloned).