org.knime.core.data
Interface DataRow

All Superinterfaces:
Iterable<DataCell>
All Known Implementing Classes:
AppendedColumnRow, BasisFunctionFilterRow, BasisFunctionLearnerRow, BlobSupportDataRow, DefaultRow, FilterColumnRow, FrequentItemSetRow, FuzzyBasisFunctionLearnerRow, JoinedRow, RadialBasisFunctionLearnerRow, ReplacedColumnsDataRow, ResortedCellsRow

public interface DataRow
extends Iterable<DataCell>

Container interface for a vector of DataCells and a row key for unique identification.

Each DataRow represents one row of a DataTable and contains a fixed number of DataCell elements which are directly accessible and read-only. In addition, each DataRow contains a unique identifier key (which is not part of the data vector).

A DataRow must not contain a null element or a null key.

This DataRow interface extends the Iterable interface but does not allow the removal of DataCells. Implementors must therefore throw an UnsupportedOperationException in the Iterators remove method.

Author:
Thomas Gabriel, University of Konstanz
See Also:
DataTable, DataCell, RowIterator, RowKey

Method Summary
 DataCell getCell(int index)
          Returns the DataCell at the provided index within this row.
 RowKey getKey()
          Returns the row key.
 int getNumCells()
          Returns the length of this row, that is the number of columns of the DataTable (not including the row key).
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

getNumCells

int getNumCells()
Returns the length of this row, that is the number of columns of the DataTable (not including the row key).

Returns:
length of this row

getKey

RowKey getKey()
Returns the row key.

Returns:
the row key

getCell

DataCell getCell(int index)
Returns the DataCell at the provided index within this row.

Parameters:
index - the index of the cell to retrieve (indices start from 0)
Returns:
the DataCell at the given index
Throws:
IndexOutOfBoundsException - if the index is out of range


Copyright, 2003 - 2010. All rights reserved.
University of Konstanz, Germany.
Chair for Bioinformatics and Information Mining, Prof. Dr. Michael R. Berthold.
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.