org.knime.base.node.preproc.filter.row
Class RowFilterTable

java.lang.Object
  extended by org.knime.base.node.preproc.filter.row.RowFilterTable
All Implemented Interfaces:
Iterable<DataRow>, DataTable

public class RowFilterTable
extends Object
implements DataTable

A DataTable which "contains" only rows that don't fall through the specified filter. The table wrapps the original table and forwards only rows that meet the filter criteria. Any RowFilter can be passed. It will decide whether a row is part of this table or not.

Author:
Peter Ohl, University of Konstanz

Constructor Summary
RowFilterTable(DataTable origTable, RowFilter filter)
          Creates a new data table which contains only rows that are not filtered out by the specified filter.
 
Method Summary
 DataTableSpec getDataTableSpec()
          Returns the DataTableSpec object of this table which gives information about the structure of this data table.
 RowIterator iterator()
          Returns a row iterator which returns each row one-by-one from the table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RowFilterTable

public RowFilterTable(DataTable origTable,
                      RowFilter filter)
Creates a new data table which contains only rows that are not filtered out by the specified filter.

Parameters:
origTable - the table to filter the rows from
filter - a row filter that will be consulted for each row to decide whether to include it or not
Method Detail

getDataTableSpec

public DataTableSpec getDataTableSpec()
Returns the DataTableSpec object of this table which gives information about the structure of this data table.

Specified by:
getDataTableSpec in interface DataTable
Returns:
the DataTableSpec of this table

iterator

public RowIterator iterator()
Returns a row iterator which returns each row one-by-one from the table.

Specified by:
iterator in interface Iterable<DataRow>
Specified by:
iterator in interface DataTable
Returns:
row iterator
See Also:
DataRow


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.