Package com.ibm.wala.util.tables
Class StringTable
- java.lang.Object
-
- com.ibm.wala.util.tables.Table<String>
-
- com.ibm.wala.util.tables.StringTable
-
-
Field Summary
-
Fields inherited from class com.ibm.wala.util.tables.Table
columnHeadings, rows
-
-
Constructor Summary
Constructors Constructor Description StringTable()create an empty tableStringTable(StringTable t)create an empty table with the same column headings as tStringTable(String[] columns)create an empty table with the given column headings
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectclone()static StringTablereadFromDirectTextFile(String fileName, Character comment)read from a direct (native) text filestatic StringTablereadFromStream(InputStream s, Character commentToken)static StringTablereadFromStream(InputStream s, Character commentToken, @Nullable Character delimiter)static StringTablereadFromTextFile(File f, Character comment)static StringreadNextNonCommentLine(LineNumberReader reader, Character commentToken)-
Methods inherited from class com.ibm.wala.util.tables.Table
addRow, computeColumnWidths, getColumnHeading, getElement, getNumberOfColumns, getNumberOfRows, padWithSpaces, removeRow, row2Map, toString
-
-
-
-
Constructor Detail
-
StringTable
public StringTable()
create an empty table
-
StringTable
public StringTable(StringTable t)
create an empty table with the same column headings as t
-
StringTable
public StringTable(String[] columns)
create an empty table with the given column headings
-
-
Method Detail
-
readFromDirectTextFile
public static StringTable readFromDirectTextFile(String fileName, Character comment) throws FileNotFoundException, IOException
read from a direct (native) text file- Throws:
IllegalArgumentException- if fileName is nullFileNotFoundExceptionIOException
-
readFromTextFile
public static StringTable readFromTextFile(File f, Character comment) throws FileNotFoundException, IOException
- Parameters:
f- a file containing a table in text format, whitespace delimited- Throws:
FileNotFoundExceptionIOException
-
readFromStream
public static StringTable readFromStream(InputStream s, Character commentToken) throws IOException
- Parameters:
s- a stream containing a table in text format, whitespace delimited- Throws:
IllegalArgumentException- if s is nullIOException
-
readFromStream
public static StringTable readFromStream(InputStream s, Character commentToken, @Nullable Character delimiter) throws IOException
- Parameters:
s- a stream containing a table in text format, whitespace delimited- Throws:
IllegalArgumentException- if s is nullIOException
-
readNextNonCommentLine
public static String readNextNonCommentLine(LineNumberReader reader, Character commentToken) throws IOException
- Throws:
IOException
-
clone
public Object clone() throws CloneNotSupportedException
- Overrides:
clonein classObject- Throws:
CloneNotSupportedException
-
-