org.knime.base.data.bitvector
Class Hex2BitVectorCellFactory
java.lang.Object
org.knime.core.data.container.AbstractCellFactory
org.knime.core.data.container.SingleCellFactory
org.knime.base.data.bitvector.BitVectorCellFactory
org.knime.base.data.bitvector.BitVectorColumnCellFactory
org.knime.base.data.bitvector.Hex2BitVectorCellFactory
- All Implemented Interfaces:
- CellFactory
public class Hex2BitVectorCellFactory
- extends BitVectorColumnCellFactory
Factory class to transform a StringValue
cell
into a DenseBitVectorCell
. If, during conversion an error occurs it
logs an error message and returns a missing cell. A flag
"wasSuccessful" (see wasSuccessful()
) can be queried to
see if this missing cell was created due to an error or due to a missing
input cell. This flag is only set (and not reset after successful conversion
of the next input cell).
- Author:
- Bernd Wiswedel, University of Konstanz
- See Also:
ReplacedColumnsTable
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Hex2BitVectorCellFactory
public Hex2BitVectorCellFactory(DataColumnSpec colSpec,
int columnIndex)
- Create new cell factory that provides one column given by newColSpec.
- Parameters:
colSpec
- the spec of the new columncolumnIndex
- index of the column to be replaced
getCell
public DataCell getCell(DataRow row)
- Called from getCells. Return the single cell to be returned.
- Specified by:
getCell
in class SingleCellFactory
- Parameters:
row
- The reference row.
- Returns:
- The new cell.
wasSuccessful
public boolean wasSuccessful()
- Specified by:
wasSuccessful
in class BitVectorCellFactory
- Returns:
true
if all conversions of all cells were
successful. false
if one conversion failed.
getNumberOfSetBits
public int getNumberOfSetBits()
- Specified by:
getNumberOfSetBits
in class BitVectorCellFactory
- Returns:
- the number of set bits.
getNumberOfNotSetBits
public int getNumberOfNotSetBits()
- Specified by:
getNumberOfNotSetBits
in class BitVectorCellFactory
- Returns:
- the number of not set bits.
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.