org.forester.util
Class BasicTable<E>

java.lang.Object
  extended by org.forester.util.BasicTable<E>

public class BasicTable<E>
extends java.lang.Object


Constructor Summary
BasicTable()
           
 
Method Summary
 int findRow(java.lang.String first_col_value)
           
 java.util.Map<java.lang.String,E> getColumnsAsMap(int key_col, int value_col)
           
 java.util.Map<java.lang.String,java.lang.Double> getColumnsAsMapDouble(int key_col, int value_col)
           
 int getNumberOfColumns()
           
 int getNumberOfRows()
           
 E getValue(int col, int row)
           
 java.lang.String getValueAsString(int col, int row)
           
 boolean isEmpty()
           
 void setValue(int col, int row, E value)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BasicTable

public BasicTable()
Method Detail

getColumnsAsMap

public java.util.Map<java.lang.String,E> getColumnsAsMap(int key_col,
                                                         int value_col)
                                                  throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

getColumnsAsMapDouble

public java.util.Map<java.lang.String,java.lang.Double> getColumnsAsMapDouble(int key_col,
                                                                              int value_col)
                                                                       throws java.lang.IllegalArgumentException,
                                                                              java.io.IOException
Throws:
java.lang.IllegalArgumentException
java.io.IOException

findRow

public int findRow(java.lang.String first_col_value)
            throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

getNumberOfColumns

public int getNumberOfColumns()

getNumberOfRows

public int getNumberOfRows()

getValue

public E getValue(int col,
                  int row)
           throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

getValueAsString

public java.lang.String getValueAsString(int col,
                                         int row)
                                  throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

isEmpty

public boolean isEmpty()

setValue

public void setValue(int col,
                     int row,
                     E value)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object