|
||||||||||
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). |
java.util.ArrayList<TokenList> |
contents
Table contents. |
java.lang.String |
description
Data description; if available, will be added as footer. |
TokenList |
header
Table header. |
Constructor Summary | |
---|---|
Table()
Default constructor. |
|
Table(java.lang.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. |
Table |
sort()
Sorts the table by the first column. |
java.lang.String |
toString()
|
Table |
toTop(byte[] top)
Moves the specified string to top. |
java.lang.String |
value(int r,
int c)
Returns the value for the specified table position. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final TokenList header
public final BoolList align
public final java.util.ArrayList<TokenList> contents
public java.lang.String description
Constructor Detail |
---|
public Table()
public Table(java.lang.String in)
in
- textual table inputMethod Detail |
---|
public Table sort()
public java.lang.String value(int r, int c)
r
- rowc
- column
public int rows()
public int cols()
public Table toTop(byte[] top)
top
- entry to be moved to the top
public byte[] finish()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |