edu.jhu.tmaj.util.file
Class TableArrayImpl<C,T>

java.lang.Object
  extended by edu.jhu.tmaj.util.file.TableArrayImpl<C,T>
All Implemented Interfaces:
TableArray<C,T>, java.lang.Cloneable

public class TableArrayImpl<C,T>
extends java.lang.Object
implements TableArray<C,T>


Constructor Summary
TableArrayImpl()
           
 
Method Summary
 void addColumn(C column)
           
 void addRow()
           
 void addRow(java.util.List<T> row)
           
 void clearAll()
           
 void clearRows()
           
 TableArray<C,T> clone()
           
 boolean equals(java.lang.Object obj)
           
 T getCell(int row, C column)
           
 T getCell(int rowNumber, int columnNumber)
           
 C getColumn(int column)
           
 java.util.List<C> getColumns()
           
 java.util.List<T> getRow(int row)
           
 java.util.List<java.util.List<T>> getRows()
           
 int getVerifiedColumnIndex(C column)
           
 int hashCode()
           
 void insertColumn(int index, C columnObj)
           
 int numberOfColumns()
           
 int numberOfRows()
           
 void removeColumn(C columnObj)
           
 void removeColumn(int columnNumber)
           
 void removeRow(int rowNumber)
           
 void setCell(int rowNumber, C columnObj, T cellObj)
           
 void setCell(int rowNumber, int columnNumber, T cellObj)
           
 void setColumn(int columnNumber, C columnObj)
           
 void setColumns(java.util.List<C> newColumns)
           
 void setRow(int rowNumber, java.util.List<T> row)
           
 void setRows(java.util.List<java.util.List<T>> newRows)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TableArrayImpl

public TableArrayImpl()
Method Detail

addColumn

public void addColumn(C column)
Specified by:
addColumn in interface TableArray<C,T>

insertColumn

public void insertColumn(int index,
                         C columnObj)
Specified by:
insertColumn in interface TableArray<C,T>

addRow

public void addRow()
Specified by:
addRow in interface TableArray<C,T>

setRows

public void setRows(java.util.List<java.util.List<T>> newRows)
Specified by:
setRows in interface TableArray<C,T>

addRow

public void addRow(java.util.List<T> row)
            throws java.lang.ArrayIndexOutOfBoundsException
Specified by:
addRow in interface TableArray<C,T>
Throws:
java.lang.ArrayIndexOutOfBoundsException

setRow

public void setRow(int rowNumber,
                   java.util.List<T> row)
            throws java.lang.ArrayIndexOutOfBoundsException
Specified by:
setRow in interface TableArray<C,T>
Throws:
java.lang.ArrayIndexOutOfBoundsException

getVerifiedColumnIndex

public int getVerifiedColumnIndex(C column)
Specified by:
getVerifiedColumnIndex in interface TableArray<C,T>

getCell

public T getCell(int rowNumber,
                 int columnNumber)
          throws java.lang.ArrayIndexOutOfBoundsException
Specified by:
getCell in interface TableArray<C,T>
Throws:
java.lang.ArrayIndexOutOfBoundsException

getCell

public T getCell(int row,
                 C column)
          throws java.lang.ArrayIndexOutOfBoundsException
Specified by:
getCell in interface TableArray<C,T>
Throws:
java.lang.ArrayIndexOutOfBoundsException

getColumn

public C getColumn(int column)
            throws java.lang.ArrayIndexOutOfBoundsException
Specified by:
getColumn in interface TableArray<C,T>
Throws:
java.lang.ArrayIndexOutOfBoundsException

getColumns

public java.util.List<C> getColumns()
Specified by:
getColumns in interface TableArray<C,T>

getRows

public java.util.List<java.util.List<T>> getRows()
Specified by:
getRows in interface TableArray<C,T>

getRow

public java.util.List<T> getRow(int row)
                         throws java.lang.ArrayIndexOutOfBoundsException
Specified by:
getRow in interface TableArray<C,T>
Throws:
java.lang.ArrayIndexOutOfBoundsException

numberOfColumns

public int numberOfColumns()
Specified by:
numberOfColumns in interface TableArray<C,T>

numberOfRows

public int numberOfRows()
Specified by:
numberOfRows in interface TableArray<C,T>

clearAll

public void clearAll()
Specified by:
clearAll in interface TableArray<C,T>

clearRows

public void clearRows()
Specified by:
clearRows in interface TableArray<C,T>

removeColumn

public void removeColumn(int columnNumber)
                  throws java.lang.ArrayIndexOutOfBoundsException
Specified by:
removeColumn in interface TableArray<C,T>
Throws:
java.lang.ArrayIndexOutOfBoundsException

removeColumn

public void removeColumn(C columnObj)
                  throws java.lang.ArrayIndexOutOfBoundsException
Specified by:
removeColumn in interface TableArray<C,T>
Throws:
java.lang.ArrayIndexOutOfBoundsException

removeRow

public void removeRow(int rowNumber)
               throws java.lang.ArrayIndexOutOfBoundsException
Specified by:
removeRow in interface TableArray<C,T>
Throws:
java.lang.ArrayIndexOutOfBoundsException

setCell

public void setCell(int rowNumber,
                    int columnNumber,
                    T cellObj)
             throws java.lang.ArrayIndexOutOfBoundsException
Specified by:
setCell in interface TableArray<C,T>
Throws:
java.lang.ArrayIndexOutOfBoundsException

setCell

public void setCell(int rowNumber,
                    C columnObj,
                    T cellObj)
             throws java.lang.ArrayIndexOutOfBoundsException
Specified by:
setCell in interface TableArray<C,T>
Throws:
java.lang.ArrayIndexOutOfBoundsException

setColumn

public void setColumn(int columnNumber,
                      C columnObj)
               throws java.lang.ArrayIndexOutOfBoundsException
Specified by:
setColumn in interface TableArray<C,T>
Throws:
java.lang.ArrayIndexOutOfBoundsException

setColumns

public void setColumns(java.util.List<C> newColumns)
Specified by:
setColumns in interface TableArray<C,T>

clone

public TableArray<C,T> clone()
Specified by:
clone in interface TableArray<C,T>
Overrides:
clone in class java.lang.Object

hashCode

public int hashCode()
Specified by:
hashCode in interface TableArray<C,T>
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Specified by:
equals in interface TableArray<C,T>
Overrides:
equals in class java.lang.Object

toString

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