at.spardat.xma.datasource
Class TabularDataHeader

java.lang.Object
  extended byat.spardat.xma.datasource.TabularDataHeader

public class TabularDataHeader
extends java.lang.Object

A TabularDataHeader stores header information for a TabularData. It maps column-names to column-indexes.


Constructor Summary
TabularDataHeader()
           
 
Method Summary
 void addColumn(java.lang.String name)
          Adds a column.
 int getColumnIndex(java.lang.String colName)
          Returns the index of the column with a given name.
 java.lang.String getColumnName(int col)
          Returns the name of a column with a given index.
 int hashCode()
           
 int size()
          Returns the number of columns.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TabularDataHeader

public TabularDataHeader()
Method Detail

size

public int size()
Returns the number of columns.

See Also:
ITabularData.size()

addColumn

public void addColumn(java.lang.String name)
Adds a column.

Parameters:
name - the name of the columne to be added
Throws:
java.lang.IllegalArgumentException - if the name is not valid or a column with that name already exists.

getColumnIndex

public int getColumnIndex(java.lang.String colName)
Returns the index of the column with a given name.

Parameters:
colName - the name of the column.
Returns:
index of the column or -1, if there is no column with that name.

getColumnName

public java.lang.String getColumnName(int col)
Returns the name of a column with a given index.

Parameters:
col - the index of the column.
Returns:
name of the column
Throws:
java.lang.IllegalArgumentException - if the provided index is out of range

hashCode

public int hashCode()
See Also:
Object.hashCode()