org.topbraid.spreadsheets.tabbedfiles
Class TabbedFileSpreadsheet

java.lang.Object
  extended by org.topbraid.spreadsheets.tabbedfiles.TabbedFileSpreadsheet
All Implemented Interfaces:
Spreadsheet

public class TabbedFileSpreadsheet
extends java.lang.Object
implements Spreadsheet

A Spreadsheet implementation that is loaded from a tab-separated file such as those exported from Excel.

Author:
Holger Knublauch

Field Summary
static java.lang.String SEPARATOR
           
 
Constructor Summary
protected TabbedFileSpreadsheet(java.io.BufferedReader reader, java.lang.Object source)
           
  TabbedFileSpreadsheet(java.io.File file)
           
  TabbedFileSpreadsheet(java.lang.String string)
           
  TabbedFileSpreadsheet(java.net.URL url)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.lang.String[] getColumnNames()
          Gets the names of all columns in the spreadsheet.
 Spreadsheet getCopy()
           
 java.lang.Object getSpreadsheetSource()
           
 int hashCode()
           
 java.util.Iterator listRows()
          Gets an Iterator of all rows in the spreadsheet, where each row is represented as an array of Strings.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SEPARATOR

public static final java.lang.String SEPARATOR
See Also:
Constant Field Values
Constructor Detail

TabbedFileSpreadsheet

protected TabbedFileSpreadsheet(java.io.BufferedReader reader,
                                java.lang.Object source)

TabbedFileSpreadsheet

public TabbedFileSpreadsheet(java.io.File file)
                      throws java.io.IOException
Throws:
java.io.IOException

TabbedFileSpreadsheet

public TabbedFileSpreadsheet(java.lang.String string)
                      throws java.io.IOException
Throws:
java.io.IOException

TabbedFileSpreadsheet

public TabbedFileSpreadsheet(java.net.URL url)
                      throws java.io.IOException
Throws:
java.io.IOException
Method Detail

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getColumnNames

public java.lang.String[] getColumnNames()
                                  throws java.io.IOException
Description copied from interface: Spreadsheet
Gets the names of all columns in the spreadsheet.

Specified by:
getColumnNames in interface Spreadsheet
Returns:
the names of the columns
Throws:
java.io.IOException

listRows

public java.util.Iterator listRows()
                            throws java.io.IOException
Description copied from interface: Spreadsheet
Gets an Iterator of all rows in the spreadsheet, where each row is represented as an array of Strings.

Specified by:
listRows in interface Spreadsheet
Returns:
an Iterator of String[]
Throws:
java.io.IOException

getSpreadsheetSource

public java.lang.Object getSpreadsheetSource()
Specified by:
getSpreadsheetSource in interface Spreadsheet
Returns:
source if the spreadsheet is constructed from a source

getCopy

public Spreadsheet getCopy()
                    throws java.io.IOException
Specified by:
getCopy in interface Spreadsheet
Throws:
java.io.IOException