Class StringMatrix<R,C>
java.lang.Object
ubic.basecode.dataStructure.matrix.AbstractMatrix<R,C,String>
ubic.basecode.dataStructure.matrix.StringMatrix<R,C>
- All Implemented Interfaces:
Serializable,Matrix2D<R,,C, String> ObjectMatrix<R,C, String>
public class StringMatrix<R,C>
extends AbstractMatrix<R,C,String>
implements ObjectMatrix<R,C,String>
A NamedMatrix containing String objects.
- Author:
- Paul Pavlidis
- See Also:
-
Field Summary
Fields inherited from class ubic.basecode.dataStructure.matrix.AbstractMatrix
MAX_ROWS_TO_PRINT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcolumns()Get the number of columns the matrix has.get(int row, int column) String[]getColObj(int col) String[]getColumn(int col) getEntry(int row, int column) getObject(int row, int col) String[]getRow(int row) booleanisMissing(int i, int j) Strings are considered missing if they are whitespace, null or empty.introws()Get the number of rows the matrix hasvoidvoidintsize()subset(int startRow, int startCol, int numRow, int numCol) subsetColumns(List<C> columns) toString()viewColumn(int column) viewRow(int row) Methods inherited from class ubic.basecode.dataStructure.matrix.AbstractMatrix
addColumnName, addRowName, asDoubles, assign, checkColRange, checkRowRange, containsColumnName, containsRowName, getColIndexByName, getColName, getColNames, getRowIndexByName, getRowName, getRowNameMapIterator, getRowNames, hasColNames, hasMissingValues, hasRow, hasRowNames, numMissing, setColumnName, setColumnNames, setRowName, setRowNamesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ubic.basecode.dataStructure.matrix.Matrix2D
addColumnName, asDoubles, assign, containsColumnName, containsRowName, getColIndexByName, getColName, getColNames, getRowIndexByName, getRowName, getRowNameMapIterator, getRowNames, hasColNames, hasRow, hasRowNames, numMissing, setColumnName, setColumnNames, setRowName, setRowNames
-
Constructor Details
-
StringMatrix
public StringMatrix(int x, int y)
-
-
Method Details
-
subsetColumns
- Specified by:
subsetColumnsin interfaceObjectMatrix<R,C, String> - Parameters:
columns-- Returns:
-
columns
public int columns()Description copied from interface:Matrix2DGet the number of columns the matrix has. -
get
- Specified by:
getin interfaceObjectMatrix<R,C, String> - Parameters:
row-column-- Returns:
-
get
-
getByKeys
-
getColObj
-
getColumn
- Specified by:
getColumnin interfaceObjectMatrix<R,C, String>
-
getEntry
-
getObject
-
getRow
- Specified by:
getRowin interfaceObjectMatrix<R,C, String>
-
isMissing
public boolean isMissing(int i, int j) Strings are considered missing if they are whitespace, null or empty. -
rows
public int rows()Description copied from interface:Matrix2DGet the number of rows the matrix has -
set
-
setByKeys
-
size
public int size()- Specified by:
sizein classAbstractMatrix<R,C, String> - Returns:
-
subset
- Specified by:
subsetin interfaceObjectMatrix<R,C, String> - Parameters:
startRow-startCol-numRow-numCol-- Returns:
-
toString
-
viewColumn
- Parameters:
column-- Returns:
-
viewRow
- Parameters:
row-- Returns:
-