columnHeadings, rows
Constructor and Description |
---|
StringTable()
create an empty table
|
StringTable(String[] columns)
create an empty table with the given column headings
|
StringTable(StringTable t)
create an empty table with the same column headings as t
|
Modifier and Type | Method and Description |
---|---|
Object |
clone() |
static StringTable |
readFromDirectTextFile(String fileName,
Character comment)
read from a direct (native) text file
|
static StringTable |
readFromStream(InputStream s,
Character commentToken) |
static StringTable |
readFromStream(InputStream s,
Character commentToken,
Character delimiter) |
static StringTable |
readFromTextFile(File f,
Character comment) |
static String |
readNextNonCommentLine(LineNumberReader reader,
Character commentToken) |
addRow, computeColumnWidths, getColumnHeading, getElement, getNumberOfColumns, getNumberOfRows, padWithSpaces, removeRow, row2Map, toString
public StringTable()
public StringTable(StringTable t)
public StringTable(String[] columns)
public static StringTable readFromDirectTextFile(String fileName, Character comment) throws FileNotFoundException, IOException
IOException
FileNotFoundException
IllegalArgumentException
- if fileName is nullpublic static StringTable readFromTextFile(File f, Character comment) throws FileNotFoundException, IOException
f
- a file containing a table in text format, whitespace delimitedIOException
FileNotFoundException
public static StringTable readFromStream(InputStream s, Character commentToken) throws IOException
s
- a stream containing a table in text format, whitespace delimitedIOException
IllegalArgumentException
- if s is nullpublic static StringTable readFromStream(InputStream s, Character commentToken, Character delimiter) throws IOException
s
- a stream containing a table in text format, whitespace delimitedIOException
IllegalArgumentException
- if s is nullpublic static String readNextNonCommentLine(LineNumberReader reader, Character commentToken) throws IOException
IOException
public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException