org.knime.base.data.replace
Class ReplacedCellFactory
java.lang.Object
org.knime.base.data.replace.ReplacedCellFactory
- All Implemented Interfaces:
- ReplacedCellsFactory
public abstract class ReplacedCellFactory
- extends Object
- implements ReplacedCellsFactory
Convenience class that should be used if your
ReplacedCellsFactory
replaces only
one column.
- Author:
- Nicolas Cebron, University of Konstanz
Method Summary |
abstract DataCell |
getReplacement(DataRow row,
int column)
Computes the data cell that should replace the column -th
column in the given row. |
DataCell[] |
getReplacement(DataRow row,
int[] columns)
Returns an array of length 1 containing the replacement of the data cell
at the position given in the first element of the columns array. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReplacedCellFactory
public ReplacedCellFactory()
getReplacement
public final DataCell[] getReplacement(DataRow row,
int[] columns)
- Returns an array of length 1 containing the replacement of the data cell
at the position given in the first element of the columns array.
- Specified by:
getReplacement
in interface ReplacedCellsFactory
- Parameters:
row
- the row carrying the "obsolete" cellscolumns
- the columns that are to be replaced
- Returns:
- the values that serve as replacement
- See Also:
#getReplacement(org.knime.core.data.DataRow, int[])
getReplacement
public abstract DataCell getReplacement(DataRow row,
int column)
- Computes the data cell that should replace the
column
-th
column in the given row. The replacing procedure itself is done in the
calling class.
- Parameters:
row
- the row carrying the "obsolete" cellcolumn
- the column that is to be replaced
- Returns:
- the value that the serves as replacement
- Throws:
IndexOutOfBoundsException
- if int argument is out of range
NullPointerException
- if row is null
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.