SuiteTable
// create a new table
var table = SuiteTable.create("MyTable");
// add columns to table
table.addStringColumn("name");
table.addIntColumn("age");
table.addInstantColumn("joined");
table.addDateTimeColumn("birthday");
table.addBooleanColumn("customer");
// define two rows
var row1 = {
"Name": "tony",
"age": 20,
"joined": Instant.now(),
"birthday": LocalDateTime.now(),
"customer": true
};
var row2 = {
"Name" : "Mark",
"age": 20,
"joined": Instant.parse("2023-10-20T12:00:00Z"),
"birthday": LocalDateTime.of(2023, 10, 24, 15, 30),
"customer": false
};
// add rows to table
table.addRow(row1);
table.addRow(row2);
return table;Adding Columns
addStringColumn(columnName: String): void
addStringColumn(columnName: String): voidaddIntColumn(columnName: String): void
addIntColumn(columnName: String): voidaddDoubleColumn(columnName: String): void
addDoubleColumn(columnName: String): voidAdding Rows
addRow(HashMap<String, Object> row): Row
addRow(HashMap<String, Object> row): RowTable Information
name(): String
name(): StringgetColumnNames(): List<String>
getColumnNames(): List<String>columnCount(): Integer
columnCount(): IntegerrowCount(): Integer
rowCount(): Integer