Table

extends Node

Table implements a two-dimensional array of Nodes.

Constructors

Table other, Node deep values = new Node[other.values.length][other.values[0].length]; // TableNodes are not immutable // tbd copy over deep or shallow System.arraycopy(values, 0, other.values, 0, values.length); // tbd check if arraycopy copies over array of arrays // Node[][] copy = new Node[values.length][values[0].length]; // System.arraycopy(values, 0, copy, 0, values.length); Node cols, Node rows

Create a new Table of the given dimensions

int c = (int)cols.numberValue(); int r = (int)rows.numberValue(); values = new Node[c][r];

Type Functions

cols()

Get the number of columns in this table

Returns: The number of columns

get(Node col, Node row)

Get the value in a given column and row

nodes()

A Nodeset containing all Nodes in the table.

rows()

Get the number of rows in this table

Returns: The number of rows

set(Node col, Node row, Node value)

Set the value in a given column and row

Returns: The current Table

string()

The concatenated value of all Nodes in the table.

Functions inherited from Node