|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectbeowulf.model.Matrix
beowulf.model.VectorMatrix
This class is an extension to the Matrix class. This VectorMatrix contains
a two dimensional grid of java.util.Vector objects. Some of
the methods have been overridden for casting convenience, and the default
value of an element of this matrix is a 0-element
java.util.Vector
| Field Summary |
| Fields inherited from class beowulf.model.Matrix |
data, numCols, numRows |
| Constructor Summary | |
VectorMatrix()
Creates a new 1x1 vector matrix. |
|
VectorMatrix(int size)
Creates a new sizexsize vector matrix. |
|
VectorMatrix(int rows,
int cols)
Creates a new rowsxcols vector matrix. |
|
| Method Summary | |
Object |
getDefaultValue()
The default value for a VectorMatrix is a new java.util.Vector. |
Vector |
getVector(int row,
int col)
This method returns the object at the specified position. |
boolean |
isEmpty()
|
| Methods inherited from class beowulf.model.Matrix |
add, add, addAll, clear, contains, containsAll, expandBy, expandBy, expandTo, expandTo, get, getCols, getRows, iterator, put, remove, remove, remove, removeAll, removeCol, removeRow, retainAll, size, toArray, toArray |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Collection |
equals, hashCode |
| Constructor Detail |
public VectorMatrix()
public VectorMatrix(int size)
sizexsize vector matrix.
size - The size of the new vector matrix.
public VectorMatrix(int rows,
int cols)
rowsxcols vector matrix.
rows - The number of rows in the new vector matrix.cols - The number of columns in the new vector matrix.| Method Detail |
public Vector getVector(int row,
int col)
row or col are out of bounds, an exception is
thrown. The return value will never be null, and the cast
to java.util.Vector is performed for tha calling function.
A ClassCastException could be thrown if something other
than a java.util.Vector has been stored in the matrix.
row - The row index of the value.col - The column index of the value.
public Object getDefaultValue()
java.util.Vector.
getDefaultValue in class Matrixjava.util.Vector.public boolean isEmpty()
isEmpty in interface CollectionisEmpty in class Matrixjava.util.Vectors.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||