Class StringMatrix
Two-dimensional string array.
Syntax
Constructors
StringMatrix()
Initializes a new instance of the StringMatrix class.
Declaration
StringMatrix
Methods
addCell(String)
Adds a cell to the current row.
Declaration
Void addCell(String value)
Parameters
Type | Name | Description |
---|---|---|
String | value | The value to store in the cell. |
Returns
Type | Description |
---|---|
Void |
addRow()
Adds a row to the matrix.
Declaration
Void addRow()
Returns
Type | Description |
---|---|
Void |
clear()
Clears the whole matrix.
Declaration
Void clear()
Returns
Type | Description |
---|---|
Void |
deleteRow(Integer)
Deletes a row from the matrix.
Declaration
Void deleteRow(Integer row)
Parameters
Type | Name | Description |
---|---|---|
Integer | row | The zero-based index of the row to delete. |
Returns
Type | Description |
---|---|
Void |
getCell(Integer,Integer)
Returns the value for a given cell.
Declaration
String getCell(Integer row, Integer column)
Parameters
Type | Name | Description |
---|---|---|
Integer | row | The zero-based index of the row. |
Integer | column | The zero-based index of the column. |
Returns
Type | Description |
---|---|
String | The value of the cell at the specified position. |
getNumColumns(Integer)
Returns number of columns in a given row
Declaration
Integer getNumColumns(Integer row)
Parameters
Type | Name | Description |
---|---|---|
Integer | row | The row to count the cells in. |
Returns
Type | Description |
---|---|
Integer | The numbers of columns (cells) in the given row. |
getNumRows()
Returns the number of rows in the matrix.
Declaration
Integer getNumRows()
Returns
Type | Description |
---|---|
Integer | The number of rows in the matrix. |
setCell(Integer,Integer,String)
Sets the value of the specified cell.
Declaration
Vodi setCell(Integer row, Integer column, String value)
Parameters
Type | Name | Description |
---|---|---|
Integer | row | The row |
Integer | column | The column |
String | value | The value to set in the specified cell. |
Returns
Type | Description |
---|---|
Void |