org.knime.base.data.bitvector
Class BitVectorCell

java.lang.Object
  extended by org.knime.core.data.DataCell
      extended by org.knime.base.data.bitvector.BitVectorCell
All Implemented Interfaces:
Serializable, BitVectorValue, DataValue

Deprecated.

@Deprecated
public class BitVectorCell
extends DataCell
implements BitVectorValue

An implementation of a cell holding an entire vector of bits.

Author:
Michael Berthold, University of Konstanz
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.knime.base.data.bitvector.BitVectorValue
BitVectorValue.BitVectorUtilityFactory
 
Nested classes/interfaces inherited from interface org.knime.core.data.DataValue
DataValue.UtilityFactory
 
Field Summary
static DataType TYPE
          Deprecated. Convenience access member for DataType.getType(BitVectorCell.class).
 
Fields inherited from interface org.knime.base.data.bitvector.BitVectorValue
UTILITY
 
Constructor Summary
BitVectorCell(BitSet bits, int nrOfBits)
          Deprecated. Creates a new BitVectorCell based on a BitSet and a fixed length for the bits.
BitVectorCell(String hex)
          Deprecated. Create new BitVectorCell with a predefined value, read from a string which holds a hexadecimal representation.
 
Method Summary
 boolean equalsDataCell(DataCell o)
          Deprecated. Check if two BitVectorCells are equal.
 BitSet getBitSet()
          Deprecated.  
 int getIntValue()
          Deprecated. Returns cardinality of this bit vector.
 int getNumBits()
          Deprecated.  
static Class<? extends DataValue> getPreferredValueClass()
          Deprecated. Preferred value class of a BitVectorCell is BitVectorValue.
 int hashCode()
          Deprecated. This method must be implemented in order to ensure that two equal DataCell objects return the same hash code.
static DataCell load(Config config)
          Deprecated. Loads a new cell using the properties from the given config.
(package private) static BitSet oldWay(String hex)
          Deprecated. The old way of constructing the bitvector cell's bitvector.
 void save(Config config)
          Deprecated. Saves this cell to the config.
 String toHexString()
          Deprecated. Provide inverse routing, converting a bit vector into the corresponding hexadecimal representation.
 String toString()
          Deprecated. Returns the String representation of this cell's value.
 
Methods inherited from class org.knime.core.data.DataCell
equals, getType, isMissing
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE

public static final DataType TYPE
Deprecated. 
Convenience access member for DataType.getType(BitVectorCell.class).

See Also:
DataType.getType(Class)
Constructor Detail

BitVectorCell

public BitVectorCell(String hex)
Deprecated. 
Create new BitVectorCell with a predefined value, read from a string which holds a hexadecimal representation. Resulting bit vector assumes lowest-to-highest order in blocks of 32 bits.

Parameters:
hex - the hexadecimal representation of the bit vector's value
Throws:
NumberFormatException - if that fails

BitVectorCell

public BitVectorCell(BitSet bits,
                     int nrOfBits)
Deprecated. 
Creates a new BitVectorCell based on a BitSet and a fixed length for the bits.

Parameters:
bits - the bit set to be put in the cell
nrOfBits - the number for the fixed length of the cell
Method Detail

getPreferredValueClass

public static final Class<? extends DataValue> getPreferredValueClass()
Deprecated. 
Preferred value class of a BitVectorCell is BitVectorValue. This method is called per reflection.

Returns:
BitVectorValue.class
See Also:
DataCell

toHexString

public String toHexString()
Deprecated. 
Provide inverse routing, converting a bit vector into the corresponding hexadecimal representation.

Specified by:
toHexString in interface BitVectorValue
Returns:
hex representation

oldWay

static BitSet oldWay(String hex)
Deprecated. 
The old way of constructing the bitvector cell's bitvector. Create new BitVectorCell with a predefined value, read from a string which holds a hexadecimal representation. Resulting bit vector assumes highest-to-lowest order, that is, the bits for the 2^3 will be left-most in each group of 4 bits. Other than that the 4-bit groups will follow the order of hex characters.

Parameters:
hex - the hexadecimal representation of the bit vector's value
Returns:
the corresponding bit set

getNumBits

public int getNumBits()
Deprecated. 
Specified by:
getNumBits in interface BitVectorValue
Returns:
number of bits actually used

getBitSet

public BitSet getBitSet()
Deprecated. 
Specified by:
getBitSet in interface BitVectorValue
Returns:
the underlying bit set
See Also:
BitSet

toString

public String toString()
Deprecated. 
Description copied from class: DataCell
Returns the String representation of this cell's value.

Specified by:
toString in class DataCell
Returns:
a bit string

getIntValue

public int getIntValue()
Deprecated. 
Returns cardinality of this bit vector.

Returns:
cardinality of this bit vector
See Also:
IntValue.getIntValue()

equalsDataCell

public boolean equalsDataCell(DataCell o)
Deprecated. 
Check if two BitVectorCells are equal.

Specified by:
equalsDataCell in class DataCell
Parameters:
o - the other object to check
Returns:
true if this instance and the given object are instances of the same class and their string representations are equal
See Also:
Object.equals(Object)

hashCode

public int hashCode()
Deprecated. 
This method must be implemented in order to ensure that two equal DataCell objects return the same hash code.

Specified by:
hashCode in class DataCell
Returns:
the hash code of your specific DataCell
See Also:
Object.hashCode(), DataCell.equals(java.lang.Object)

save

public void save(Config config)
Deprecated. 
Saves this cell to the config.

Parameters:
config - to write into it
See Also:
toString()

load

public static DataCell load(Config config)
                     throws InvalidSettingsException
Deprecated. 
Loads a new cell using the properties from the given config.

Parameters:
config - the config to get String from and inits this cell
Returns:
a new bit vector cell
Throws:
InvalidSettingsException - if the value is not available


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.