com.ibm.wala.util.tables
Class Table<T>
java.lang.Object
com.ibm.wala.util.tables.Table<T>
- All Implemented Interfaces:
- java.lang.Cloneable
- Direct Known Subclasses:
- StringTable
public class Table<T>
- extends java.lang.Object
- implements java.lang.Cloneable
|
Constructor Summary |
Table()
create an empty table |
Table(java.lang.String[] columns)
create an empty table with the given column headings |
Table(Table<T> t)
create an empty table with the same column headings as t |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
rows
protected final SimpleVector<SimpleVector<T>> rows
columnHeadings
protected final SimpleVector<java.lang.String> columnHeadings
Table
public Table()
- create an empty table
Table
public Table(Table<T> t)
- create an empty table with the same column headings as t
Table
public Table(java.lang.String[] columns)
- create an empty table with the given column headings
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
getElement
public T getElement(int row,
int column)
getColumnHeading
public java.lang.String getColumnHeading(int i)
- Note that column indices start at zero
getNumberOfColumns
public int getNumberOfColumns()
getNumberOfRows
public int getNumberOfRows()
row2Map
public java.util.Map<java.lang.String,T> row2Map(int row)
addRow
public void addRow(java.util.Map<java.lang.String,T> p)