public class ByteBufferBitVector extends AbstractBitVector
ByteBuffer as a read-only BitVector.AbstractBitVector.LongBigListView, AbstractBitVector.LongSetView, AbstractBitVector.SubBitVector| Constructor and Description |
|---|
ByteBufferBitVector(ByteBuffer b)
Ctor assumes that all bits in the buffer are used.
|
ByteBufferBitVector(ByteBuffer b,
long off,
long len) |
| Modifier and Type | Method and Description |
|---|---|
protected int |
byteIndexForBit(long bitIndex)
Return the index of the byte in which the bit with the given index is
encoded.
|
boolean |
getBoolean(long index)
Extract and return a bit coded flag.
|
long |
length()
Returns the number of bits in this bit vector.
|
protected int |
withinByteIndexForBit(long bitIndex)
Return the offset within the byte in which the bit is coded of the bit
(this is just the remainder
bitIndex % 8). |
add, add, add, add, add, and, append, append, asLongBigList, asLongSet, bits, clear, clear, clear, compareTo, compareTo, copy, copy, count, ensureIndex, ensureRestrictedIndex, equals, fast, fill, fill, fill, fill, firstOne, firstZero, flip, flip, flip, flip, getBoolean, getInt, getLong, hashCode, lastOne, lastZero, length, longestCommonPrefixLength, nextOne, nextZero, or, previousOne, previousZero, removeBoolean, removeBoolean, replace, set, set, set, set, set, size, size, subList, subVector, subVector, toString, xoradd, addAll, addAll, addAll, addAll, addAll, addAll, addElements, addElements, booleanListIterator, booleanListIterator, booleanSubList, contains, ensureIndex, ensureRestrictedIndex, get, getElements, indexOf, indexOf, iterator, lastIndexOf, lastIndexOf, listIterator, listIterator, peek, peekBoolean, pop, popBoolean, push, push, rem, remove, remove, removeElements, set, top, topBooleanadd, booleanIterator, contains, containsAll, containsAll, isEmpty, rem, removeAll, removeAll, retainAll, retainAll, toArray, toArray, toArray, toBooleanArray, toBooleanArrayclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddAll, addAll, addAll, addElements, addElements, booleanListIterator, booleanListIterator, booleanSubList, getElements, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeElementsadd, add, addAll, addAll, contains, containsAll, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeAll, retainAll, set, toArray, toArraypublic ByteBufferBitVector(ByteBuffer b)
b - The buffer.public ByteBufferBitVector(ByteBuffer b, long off, long len)
b - The buffer.off - The offset from the start of the buffer for the view.len - The #of bits which will be included in the view.public final long length()
BitVectorIf the number of bits in this vector is smaller than or equal to Integer.MAX_VALUE, this
method is semantically equivalent to List.size().
protected final int byteIndexForBit(long bitIndex)
bitIndex - The bit index.protected final int withinByteIndexForBit(long bitIndex)
bitIndex % 8).bitIndex - The bit index into the byte[].public boolean getBoolean(long index)
offset - The offset in the buffer of the start of the byte[] sequence
in which the bit coded flags are stored.index - The index of the bit.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.