Class StringTable

  • All Implemented Interfaces:
    java.lang.Cloneable

    public class StringTable
    extends Table<java.lang.String>
    implements java.lang.Cloneable
    • 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.lang.IllegalArgumentException - if fileName is null
        java.io.FileNotFoundException
        java.io.IOException
      • 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.FileNotFoundException
        java.io.IOException
      • 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.lang.IllegalArgumentException - if s is null
        java.io.IOException
      • 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.lang.IllegalArgumentException - if s is null
        java.io.IOException
      • 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