public class Data.Row
int |
colCount ()
Get number of columns in the enclosing Data . |
void |
copy (Data.Row dst, int begin, int end, int dstBegin)
Copy cell values to another row. |
String[] |
copy (String[] dst)
Copy all cell values to another array. |
void |
copy (String[] dst, int begin, int end, int dstBegin)
Copy cell values to another array. |
String |
get (int index)
Get value of a cell by column index. |
String |
get (String hdr)
Get cell value. |
Boolean |
getBool (String hdr)
Get cell value as boolean. |
Integer |
getInt (String hdr)
Get cell value as integer. |
Double |
getNum (String hdr)
Get cell value as a double-precision real number. |
void |
set (int index, Object v)
Update value of a cell by column index. |
void |
set (String hdr, Object v)
Update cell value. |
void |
update (String... vs)
Set multiple cell values at once. |
Show all inherited methods (11 more) |
public int colCount ();
Get number of columns in the enclosing Data
. (TODO explain row referencing)
number of columns
public String get ( int index );
Get value of a cell by column index. Use for faster access.
index
cell value
ArrayIndexOutOfBoundsException
public void set ( int index, Object v );
Update value of a cell by column index. Use for faster access.
The value of v
is converted to String
using Object.toString()
unless v
is null
.
index
v
ArrayIndexOutOfBoundsException
public void copy ( String[] dst, int begin, int end, int dstBegin );
Copy cell values to another array.
dst
null
begin
end
dstBegin
NullPointerException
dst
is null
ArrayIndexOutOfBoundsException
dst
rangepublic String[] copy ( String[] dst );
Copy all cell values to another array.
dst
null
, a new array is created and returned.destination array
public void copy ( Data.Row dst, int begin, int end, int dstBegin );
Copy cell values to another row.
dst
null
begin
end
dstBegin
NullPointerException
dst
is null
ArrayIndexOutOfBoundsException
dst
rangepublic String get ( String hdr );
Get cell value.
hdr
cell value, which can be null
NoSuchElementException
public Integer getInt ( String hdr );
Get cell value as integer.
Conversion is done by Integer.parseInt(String)
and can throw a NumberFormatException
;
null
is returned only if the cell value is null.
hdr
cell value, which can be null
NoSuchElementException
NumberFormatException
public Double getNum ( String hdr );
Get cell value as a double-precision real number.
Conversion is done by Double.parseDouble(String)
and can throw a NumberFormatException
;
null
is returned only if the cell value is null.
hdr
cell value, which can be null
NoSuchElementException
NumberFormatException
double
.public Boolean getBool ( String hdr );
Get cell value as boolean. Conversion is done by Boolean.parseBoolean(String)
;
null
is returned only if the cell value is null.
hdr
cell value, which can be null
NoSuchElementException
public void set ( String hdr, Object v );
Update cell value. The value of v
is converted to String
using Object.toString()
unless v
is null
.
hdr
v
NoSuchElementException
Contains one row of values.
Values are stored as nullable strings. The number of cells matches the number of headers in the enclosing
Data
. (TODO explain row referencing)