private static final class BitmapIndexImpl.CompressedBitmapBuilder extends java.lang.Object implements BitmapIndex.BitmapBuilder
Modifier and Type | Field and Description |
---|---|
private BitmapIndexImpl |
bitmapIndex |
private BitmapIndexImpl.ComboBitset |
bitset |
Constructor and Description |
---|
CompressedBitmapBuilder(BitmapIndexImpl bitmapIndex) |
Modifier and Type | Method and Description |
---|---|
BitmapIndex.BitmapBuilder |
addObject(AnyObjectId objectId,
int type)
Adds the id to the bitmap.
|
BitmapIndexImpl.CompressedBitmapBuilder |
andNot(BitmapIndex.Bitmap other)
Bitwise-AND-NOT the current bitmap with the value from the other
bitmap.
|
BitmapIndexImpl.CompressedBitmap |
build() |
int |
cardinality() |
boolean |
contains(AnyObjectId objectId)
Whether the bitmap has the id set.
|
private com.googlecode.javaewah.EWAHCompressedBitmap |
ewahBitmap(BitmapIndex.Bitmap other) |
BitmapIndexImpl |
getBitmapIndex()
Get the BitmapIndex for this BitmapBuilder.
|
java.util.Iterator<BitmapObject> |
iterator()
Returns an iterator over a set of elements of type BitmapObject.
|
BitmapIndexImpl.CompressedBitmapBuilder |
or(BitmapIndex.Bitmap other)
Bitwise-OR the current bitmap with the value from the other bitmap.
|
void |
remove(AnyObjectId objectId)
Remove the id from the bitmap.
|
boolean |
removeAllOrNone(PackBitmapIndex index)
Determines if the entire bitmap index is contained in the bitmap.
|
BitmapIndexImpl.CompressedBitmapBuilder |
xor(BitmapIndex.Bitmap other)
Bitwise-XOR the current bitmap with the value from the other bitmap.
|
private BitmapIndexImpl.ComboBitset bitset
private final BitmapIndexImpl bitmapIndex
CompressedBitmapBuilder(BitmapIndexImpl bitmapIndex)
public boolean contains(AnyObjectId objectId)
BitmapIndex.BitmapBuilder
contains
in interface BitmapIndex.BitmapBuilder
objectId
- the object IDpublic BitmapIndex.BitmapBuilder addObject(AnyObjectId objectId, int type)
BitmapIndex.BitmapBuilder
addObject
in interface BitmapIndex.BitmapBuilder
objectId
- the object IDtype
- the Git object type. See Constants
.public void remove(AnyObjectId objectId)
BitmapIndex.BitmapBuilder
remove
in interface BitmapIndex.BitmapBuilder
objectId
- the object IDpublic BitmapIndexImpl.CompressedBitmapBuilder or(BitmapIndex.Bitmap other)
BitmapIndex.BitmapBuilder
or
in interface BitmapIndex.Bitmap
or
in interface BitmapIndex.BitmapBuilder
other
- the other bitmappublic BitmapIndexImpl.CompressedBitmapBuilder andNot(BitmapIndex.Bitmap other)
BitmapIndex.BitmapBuilder
andNot
in interface BitmapIndex.Bitmap
andNot
in interface BitmapIndex.BitmapBuilder
other
- the other bitmappublic BitmapIndexImpl.CompressedBitmapBuilder xor(BitmapIndex.Bitmap other)
BitmapIndex.BitmapBuilder
xor
in interface BitmapIndex.Bitmap
xor
in interface BitmapIndex.BitmapBuilder
other
- the other bitmappublic BitmapIndexImpl.CompressedBitmap build()
build
in interface BitmapIndex.BitmapBuilder
public java.util.Iterator<BitmapObject> iterator()
BitmapIndex.Bitmap
Iterator.next()
for performance reasons.iterator
in interface java.lang.Iterable<BitmapObject>
iterator
in interface BitmapIndex.Bitmap
public int cardinality()
cardinality
in interface BitmapIndex.BitmapBuilder
public boolean removeAllOrNone(PackBitmapIndex index)
BitmapIndex.BitmapBuilder
removeAllOrNone
in interface BitmapIndex.BitmapBuilder
index
- the bitmap index to check if it is completely contained
inside of the current bitmap.true
if the bitmap index was a complete match.public BitmapIndexImpl getBitmapIndex()
BitmapIndex.BitmapBuilder
getBitmapIndex
in interface BitmapIndex.BitmapBuilder
private com.googlecode.javaewah.EWAHCompressedBitmap ewahBitmap(BitmapIndex.Bitmap other)