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, toStringpublic StringTable()
public StringTable(StringTable t)
public StringTable(String[] columns)
public static StringTable readFromDirectTextFile(String fileName, Character comment) throws FileNotFoundException, IOException
IllegalArgumentException - if fileName is nullFileNotFoundExceptionIOExceptionpublic static StringTable readFromTextFile(File f, Character comment) throws FileNotFoundException, IOException
f - a file containing a table in text format, whitespace delimitedFileNotFoundExceptionIOExceptionpublic static StringTable readFromStream(InputStream s, Character commentToken) throws IOException
s - a stream containing a table in text format, whitespace delimitedIllegalArgumentException - if s is nullIOExceptionpublic static StringTable readFromStream(InputStream s, Character commentToken, Character delimiter) throws IOException
s - a stream containing a table in text format, whitespace delimitedIllegalArgumentException - if s is nullIOExceptionpublic static String readNextNonCommentLine(LineNumberReader reader, Character commentToken) throws IOException
IOExceptionpublic Object clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedException