|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.basex.util.Table
public final class Table
This is a table representation for textual table output.
It should be guaranteed that the header
object has the
same number of entries as all contents
string arrays.
Field Summary | |
---|---|
BoolList |
align
Alignment (false: left, true: right alignment). |
ArrayList<TokenList> |
contents
Data (usually strings). |
String |
desc
Data description. |
static int |
DIST
Distance between table columns. |
TokenList |
header
Table header. |
Constructor Summary | |
---|---|
Table()
Default constructor. |
|
Table(String in)
Constructor with table input. |
Method Summary | |
---|---|
int |
cols()
Returns the number of columns. |
byte[] |
finish()
Returns a textual representation of the table. |
int |
rows()
Returns the number of rows. |
void |
sort()
Sorts the table by the first column. |
void |
toTop(byte[] top)
Moves the specified string to top. |
String |
value(int r,
int c)
Returns the value for the specified table position. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public TokenList header
public static final int DIST
public BoolList align
public ArrayList<TokenList> contents
public String desc
Constructor Detail |
---|
public Table()
public Table(String in)
in
- textual table inputMethod Detail |
---|
public void sort()
public String value(int r, int c)
r
- rowc
- column
public int rows()
public int cols()
public void toTop(byte[] top)
top
- entry to be moved to the toppublic byte[] finish()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |