org.opensha.nshmp.util
Class BatchFileReader

java.lang.Object
  extended by org.opensha.nshmp.util.BatchFileReader

public class BatchFileReader
extends java.lang.Object


Constructor Summary
BatchFileReader(java.lang.String filename)
          Creates an HSSFWorkbook object for reading in data.
 
Method Summary
static BatchFileReader createReaderFromGui()
           
 java.util.ArrayList<java.lang.String> getColumnStringVals(short columnNumber)
           
 java.util.ArrayList<java.lang.String> getColumnStringVals(short columnNumber, int sheetNumber)
           
 java.util.ArrayList<java.lang.Double> getColumnVals(short columnNumber)
           
 java.util.ArrayList<java.lang.Double> getColumnVals(short columnNumber, int sheetNumber)
          Gets all the values for the given column on the given sheet number.
 boolean ready()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BatchFileReader

public BatchFileReader(java.lang.String filename)
Creates an HSSFWorkbook object for reading in data.

Parameters:
filename - The name of the workbook to read.
Method Detail

getColumnVals

public java.util.ArrayList<java.lang.Double> getColumnVals(short columnNumber)

getColumnVals

public java.util.ArrayList<java.lang.Double> getColumnVals(short columnNumber,
                                                           int sheetNumber)
Gets all the values for the given column on the given sheet number. This will only get the values from the second row onwards to allow for a header row. (You only get one header row, tough).

Parameters:
columnNumber - The number of the column you wish to get. Column A = 0.
sheetNumber - The number of the sheet you wish to get. Sheet1 = 0.
Returns:
An ArrayList containing all the doubles it found in the column.

getColumnStringVals

public java.util.ArrayList<java.lang.String> getColumnStringVals(short columnNumber)

getColumnStringVals

public java.util.ArrayList<java.lang.String> getColumnStringVals(short columnNumber,
                                                                 int sheetNumber)

ready

public boolean ready()

createReaderFromGui

public static BatchFileReader createReaderFromGui()