com.sleepycat.je.utilint
Class BitMap
java.lang.Object
com.sleepycat.je.utilint.BitMap
public class BitMap
- extends Object
Bitmap which supports indexing with long arguments. java.util.BitSet
provides all the functionality and performance we need, but requires integer
indexing.
Long indexing is implemented by keeping a Map of java.util.BitSets, where
each bitset covers 2^16 bits worth of values. The Bitmap may be sparse, in
that each segment is only instantiated when needed.
Note that this class is currently not thread safe; adding a new bitset
segment is not protected.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BitMap
public BitMap()
set
public void set(long index)
throws IndexOutOfBoundsException
- Throws:
IndexOutOfBoundsException
get
public boolean get(long index)
throws IndexOutOfBoundsException
- Throws:
IndexOutOfBoundsException
getNumSegments
int getNumSegments()
cardinality
int cardinality()
Copyright 2004-2005 Sleepycat, Inc. All Rights Reserved.