|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BitVectorValue
Implementing DataCell
s store '0's and '1's at specific positions in
a vector.
Nested Class Summary | |
---|---|
static class |
BitVectorValue.BitVectorUtilityFactory
Implementations of the meta information of this value class. |
Nested classes/interfaces inherited from interface org.knime.core.data.DataValue |
---|
DataValue.UtilityFactory |
Field Summary | |
---|---|
static DataValue.UtilityFactory |
UTILITY
Meta information to bit vector values. |
Method Summary | |
---|---|
long |
cardinality()
Returns the number of set bits (bits with value '1') in the vector. |
boolean |
get(long index)
Returns the value of the specified bit. |
boolean |
isEmpty()
Returns true, if all bits in the vector are cleared. |
long |
length()
Returns the length of the bit vector. |
long |
nextClearBit(long startIdx)
Finds the next bit not set (that is '0') on or after the specified index. |
long |
nextSetBit(long startIdx)
Finds the next bit set to one on or after the specified index. |
String |
toBinaryString()
Returns the binary string representation of the bits in this vector. |
String |
toHexString()
Returns the hex representation of the bits in this vector. |
Field Detail |
---|
static final DataValue.UtilityFactory UTILITY
DataValue.UTILITY
Method Detail |
---|
long length()
long cardinality()
boolean get(long index)
index
- the index of the bit to test
boolean isEmpty()
long nextClearBit(long startIdx)
startIdx
- the first index to look for '0's.
ArrayIndexOutOfBoundsException
- if the specified startIdx negativelong nextSetBit(long startIdx)
startIdx
- the first index to look for '1's. (It is allowed to pass
an index larger then the vector's length.)
ArrayIndexOutOfBoundsException
- if the specified startIdx is
negativeString toHexString()
'0'
-
'9'
and 'A'
- 'F'
). The
character at string position (length - 1)
holds the lowest
bits (bit 0 to 3), the character at position 0 represents the bits with
the largest index in the vector. If the length of the vector is larger
than (Integer.MAX_VALUE
- 1) * 4 (i.e. 8589934584), the result
is truncated (and ends with ...).
String toBinaryString()
(length - 1)
holds the bit with index 0, the character at
position 0 represents the bits with the largest index in the vector. If
the length of the vector is larger than (Integer.MAX_VALUE
- 3)
(i.e. 2147483644), the result is truncated (and ends with ...).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |