org.knime.core.data.def
Class JoinedRow

java.lang.Object
  extended by org.knime.core.data.def.JoinedRow
All Implemented Interfaces:
Iterable<DataCell>, DataRow

public class JoinedRow
extends Object
implements DataRow

Row that concatenates two given rows.

Author:
Bernd Wiswedel, University of Konstanz

Constructor Summary
JoinedRow(DataRow left, DataRow right)
          Creates a new row based on two given rows.
 
Method Summary
 DataCell getCell(int index)
          Returns the DataCell at the provided index within this row.
 RowKey getKey()
          Returns the key from the left row that was passed in the constructor.
 DataRow getLeftRow()
           
 int getNumCells()
          Returns the length of this row, that is the number of columns of the DataTable (not including the row key).
 DataRow getRightRow()
           
 Iterator<DataCell> iterator()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JoinedRow

public JoinedRow(DataRow left,
                 DataRow right)
Creates a new row based on two given rows.

Parameters:
left - The left row providing the head cells
right - The right row providing the tail cells
Throws:
NullPointerException - If either argument is null
IllegalArgumentException - If row key's ids aren't equal.
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 key from the left row that was passed in the constructor. 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>

getLeftRow

public DataRow getLeftRow()
Returns:
the row, that was passed to the constructor and that holds the left cells (low index cells).

getRightRow

public DataRow getRightRow()
Returns:
the row, that was passed to the constructor and that holds the right cells (high index cells).


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.