org.knime.base.data.append.column
Class AppendedColumnRow

java.lang.Object
  extended by org.knime.base.data.append.column.AppendedColumnRow
All Implemented Interfaces:
Iterable<DataCell>, DataRow

public class AppendedColumnRow
extends Object
implements DataRow

A DataRow that is extended by one or more cells.

Author:
Bernd Wiswedel, University of Konstanz

Constructor Summary
AppendedColumnRow(DataRow baseRow, DataCell... appendCell)
          Creates new Row with baseRow providing the first cells and appendCell as last cells.
AppendedColumnRow(DataRow baseRow, DataRow appendedRow, boolean[] appendColumn)
          Create a new row with the baseRow providing the first cells and appendedRow providing the following cells.
AppendedColumnRow(RowKey rowKey, DataRow baseRow, DataCell... appendCell)
          Creates new Row with baseRow providing the first cells and appendCell as last cells.
AppendedColumnRow(RowKey rowKey, DataRow baseRow, DataRow appendedRow)
          Create a new row with the baseRow providing the first cells and appendedRow providing the following cells.
AppendedColumnRow(RowKey rowKey, DataRow baseRow, DataRow appendedRow, boolean[] appendColumn)
          Create a new row with the baseRow providing the first cells and appendedRow providing the following cells.
 
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).
 Iterator<DataCell> iterator()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AppendedColumnRow

public AppendedColumnRow(DataRow baseRow,
                         DataCell... appendCell)
Creates new Row with baseRow providing the first cells and appendCell as last cells.

Parameters:
baseRow - Containing the first cells
appendCell - The last cells (to be appended).

AppendedColumnRow

public AppendedColumnRow(RowKey rowKey,
                         DataRow baseRow,
                         DataCell... appendCell)
Creates new Row with baseRow providing the first cells and appendCell as last cells.

Parameters:
rowKey - new row key for the resulting appended row
baseRow - Containing the first cells
appendCell - The last cells (to be appended).

AppendedColumnRow

public AppendedColumnRow(DataRow baseRow,
                         DataRow appendedRow,
                         boolean[] appendColumn)
Create a new row with the baseRow providing the first cells and appendedRow providing the following cells. Which cells from the second row should be appended is passed in appendColumn (true for adding the cells at the index, false for not adding it).

Parameters:
baseRow - row with the first cells
appendedRow - row with the cells to append
appendColumn - array with entries set to true, if the corresponding cells from the second row should be added

AppendedColumnRow

public AppendedColumnRow(RowKey rowKey,
                         DataRow baseRow,
                         DataRow appendedRow,
                         boolean[] appendColumn)
Create a new row with the baseRow providing the first cells and appendedRow providing the following cells. Which cells from the second row should be appended is passed in appendColumn (true for adding the cells at the index, false for not adding it).

Parameters:
rowKey - new row key for the resulting appended row
baseRow - row with the first cells
appendedRow - row with the cells to append
appendColumn - array with entries set to true, if the corresponding cells from the second row should be added

AppendedColumnRow

public AppendedColumnRow(RowKey rowKey,
                         DataRow baseRow,
                         DataRow appendedRow)
Create a new row with the baseRow providing the first cells and appendedRow providing the following cells.

Parameters:
rowKey - new row key for the resulting appended row
baseRow - row with the first cells
appendedRow - row with the cells to append
Method Detail

getNumCells

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

Specified by:
getNumCells in interface DataRow
Returns:
length of this row

getKey

public RowKey getKey()
Returns the row key.

Specified by:
getKey in interface DataRow
Returns:
the row key

getCell

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

Specified by:
getCell in interface DataRow
Parameters:
index - the index of the cell to retrieve (indices start from 0)
Returns:
the DataCell at the given index

iterator

public Iterator<DataCell> iterator()

Specified by:
iterator in interface Iterable<DataCell>


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.