com.sleepycat.je.utilint
Class BitMap

java.lang.Object
  extended by 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.


Constructor Summary
BitMap()
           
 
Method Summary
(package private)  int cardinality()
           
 boolean get(long index)
           
(package private)  int getNumSegments()
           
 void set(long index)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BitMap

public BitMap()
Method Detail

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.