public class Table
extends java.lang.Object
Constructor and Description |
---|
Table(int rows,
int cols)
Create table with specific rows and cols.
|
Modifier and Type | Method and Description |
---|---|
int |
getColCount()
Return number of all columns.
|
java.lang.String[][] |
getData()
Get matrix from table.
|
java.lang.String |
getData(int row,
int col)
Return data from specific cell.
|
java.lang.String[] |
getNames()
Get columns names.
|
int |
getRowCount()
Return number of all rows.
|
void |
setData(java.lang.String[][] newVal)
Set matrix to table.
|
void |
setData(java.lang.String value,
int row,
int col)
Set data to specific cell.
|
void |
setNames(java.lang.String[] newVal)
Set names of columns.
|
public Table(int rows, int cols)
rows
- int - number of rowscols
- int - number of colspublic java.lang.String[] getNames()
public java.lang.String[][] getData()
public void setData(java.lang.String[][] newVal)
newVal
- String[][] - matrix datapublic void setNames(java.lang.String[] newVal)
newVal
- String[] - names of columnspublic void setData(java.lang.String value, int row, int col)
value
- String - data to saverow
- int - row indexcol
- int - rol indexpublic java.lang.String getData(int row, int col)
row
- int - row indexcol
- int - col indexpublic int getRowCount()
public int getColCount()