com.ibm.wala.util.tables
Class StringTable

java.lang.Object
  extended by com.ibm.wala.util.tables.Table<java.lang.String>
      extended by com.ibm.wala.util.tables.StringTable
All Implemented Interfaces:
java.lang.Cloneable

public class StringTable
extends Table<java.lang.String>
implements java.lang.Cloneable


Field Summary
 
Fields inherited from class com.ibm.wala.util.tables.Table
columnHeadings, rows
 
Constructor Summary
StringTable()
          create an empty table
StringTable(java.lang.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
 
Method Summary
 java.lang.Object clone()
           
static StringTable readFromDirectTextFile(java.lang.String fileName, java.lang.Character comment)
          read from a direct (native) text file
static StringTable readFromStream(java.io.InputStream s, java.lang.Character commentToken)
           
static StringTable readFromStream(java.io.InputStream s, java.lang.Character commentToken, java.lang.Character delimiter)
           
static StringTable readFromTextFile(java.io.File f, java.lang.Character comment)
           
static java.lang.String readNextNonCommentLine(java.io.LineNumberReader reader, java.lang.Character commentToken)
           
 
Methods inherited from class com.ibm.wala.util.tables.Table
addRow, computeColumnWidths, getColumnHeading, getElement, getNumberOfColumns, getNumberOfRows, padWithSpaces, removeRow, row2Map, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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(java.lang.String[] columns)
create an empty table with the given column headings

Method Detail

readFromDirectTextFile

public static StringTable readFromDirectTextFile(java.lang.String fileName,
                                                 java.lang.Character comment)
                                          throws java.io.FileNotFoundException,
                                                 java.io.IOException
read from a direct (native) text file

Throws:
java.io.IOException
java.io.FileNotFoundException
java.lang.IllegalArgumentException - if fileName is null

readFromTextFile

public static StringTable readFromTextFile(java.io.File f,
                                           java.lang.Character comment)
                                    throws java.io.FileNotFoundException,
                                           java.io.IOException
Parameters:
f - a file containing a table in text format, whitespace delimited
Throws:
java.io.IOException
java.io.FileNotFoundException

readFromStream

public static StringTable readFromStream(java.io.InputStream s,
                                         java.lang.Character commentToken)
                                  throws java.io.IOException
Parameters:
s - a stream containing a table in text format, whitespace delimited
Throws:
java.io.IOException
java.lang.IllegalArgumentException - if s is null

readFromStream

public static StringTable readFromStream(java.io.InputStream s,
                                         java.lang.Character commentToken,
                                         java.lang.Character delimiter)
                                  throws java.io.IOException
Parameters:
s - a stream containing a table in text format, whitespace delimited
Throws:
java.io.IOException
java.lang.IllegalArgumentException - if s is null

readNextNonCommentLine

public static java.lang.String readNextNonCommentLine(java.io.LineNumberReader reader,
                                                      java.lang.Character commentToken)
                                               throws java.io.IOException
Throws:
java.io.IOException

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException