Unlike java.util.bitset, the fact that bits are packed into an array of longs is part of the interface. This allows efficient implementation of other algorithms by someone other than the author. It also allows one to efficiently implement alternate serialization or interchange formats.
The index range for a bitset can easily exceed positive int
range in Java (0x7fffffff), so many methods in this class accept or return a long
. There are adapter methods that return views compatible with {@link LongLookupContainer} and {@link IntLookupContainer} interfaces.
|
|