org.knime.base.data.filter.column
Class FilterColumnRow

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

public final class FilterColumnRow
extends Object
implements DataRow

Filter DataRow which extracts particular cells (columns) from an underlying row.

Author:
Thomas Gabriel, University of Konstanz

Constructor Summary
FilterColumnRow(DataRow row, int[] columns)
          Inits a new filter column DataRow with the underling row and an array of indices into this row.
 
Method Summary
 DataCell getCell(int index)
          Returns the data cell at the given index.
 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

FilterColumnRow

public FilterColumnRow(DataRow row,
                       int[] columns)
Inits a new filter column DataRow with the underling row and an array of indices into this row.

Parameters:
row - the underlying DataRow
columns - the array of column indices to keep
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 data cell at the given index.

Specified by:
getCell in interface DataRow
Parameters:
index - the column index inside the row
Returns:
the data cell for index
Throws:
ArrayIndexOutOfBoundsException - if the index is out of range

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.