|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ByteVectorValue
Implementations are vectors of fixed length storing byte counts at specific
positions. Only positive values of counts are supported. Each index can store
a number between 0 and 255 (both inclusive).
Nested Class Summary | |
---|---|
static class |
ByteVectorValue.ByteVectorUtilityFactory
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 byte vector values. |
Method Summary | |
---|---|
int |
cardinality()
Returns the number of counts larger than zero stored in this vector. |
int |
get(long index)
Returns the count stored at the specified position. |
boolean |
isEmpty()
Checks all counts and returns true if they are all zero. |
long |
length()
Returns the length of the byte vector. |
long |
nextCountIndex(long startIdx)
Finds the next count not equal to zero on or after the specified index. |
long |
nextZeroIndex(long startIdx)
Finds the next index whose value is zero on or after the specified index. |
long |
sumOfAllCounts()
Calculates the checksum, the sum of all counts stored. |
Field Detail |
---|
static final DataValue.UtilityFactory UTILITY
DataValue.UTILITY
Method Detail |
---|
long length()
long sumOfAllCounts()
int cardinality()
int get(long index)
index
- the index of the count to return
ArrayIndexOutOfBoundsException
- if the specified index is negative
or too large.boolean isEmpty()
long nextZeroIndex(long startIdx)
startIdx
- the first index to look for zero values.
ArrayIndexOutOfBoundsException
- if the specified startIdx negativelong nextCountIndex(long startIdx)
startIdx
- the first index to look for non-zero counts. (It is
allowed to pass an index larger then the vector's length.)
ArrayIndexOutOfBoundsException
- if the specified startIdx is
negative
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |