Class BitmapIndexImpl.CompressedBitmapBuilder
java.lang.Object
org.eclipse.jgit.internal.storage.file.BitmapIndexImpl.CompressedBitmapBuilder
- All Implemented Interfaces:
Iterable<BitmapObject>
,BitmapIndex.Bitmap
,BitmapIndex.BitmapBuilder
- Enclosing class:
BitmapIndexImpl
private static final class BitmapIndexImpl.CompressedBitmapBuilder
extends Object
implements BitmapIndex.BitmapBuilder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BitmapIndexImpl
private BitmapIndexImpl.ComboBitset
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddObject
(AnyObjectId objectId, int type) Adds the id to the bitmap.andNot
(BitmapIndex.Bitmap other) Bitwise-AND-NOT the current bitmap with the value from the other bitmap.build()
int
boolean
contains
(AnyObjectId objectId) Whether the bitmap has the id set.private com.googlecode.javaewah.EWAHCompressedBitmap
ewahBitmap
(BitmapIndex.Bitmap other) Get the BitmapIndex for this BitmapBuilder.iterator()
Returns an iterator over a set of elements of type BitmapObject.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.com.googlecode.javaewah.EWAHCompressedBitmap
Returns the corresponding raw compressed EWAH bitmap of the bitmap.xor
(BitmapIndex.Bitmap other) Bitwise-XOR the current bitmap with the value from the other bitmap.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
bitset
-
bitmapIndex
-
-
Constructor Details
-
CompressedBitmapBuilder
CompressedBitmapBuilder(BitmapIndexImpl bitmapIndex)
-
-
Method Details
-
contains
Description copied from interface:BitmapIndex.BitmapBuilder
Whether the bitmap has the id set.- Specified by:
contains
in interfaceBitmapIndex.BitmapBuilder
- Parameters:
objectId
- the object ID- Returns:
- whether the bitmap currently contains the object ID
-
addObject
Description copied from interface:BitmapIndex.BitmapBuilder
Adds the id to the bitmap.- Specified by:
addObject
in interfaceBitmapIndex.BitmapBuilder
- Parameters:
objectId
- the object IDtype
- the Git object type. SeeConstants
.- Returns:
- the current builder.
-
remove
Description copied from interface:BitmapIndex.BitmapBuilder
Remove the id from the bitmap.- Specified by:
remove
in interfaceBitmapIndex.BitmapBuilder
- Parameters:
objectId
- the object ID
-
or
Description copied from interface:BitmapIndex.BitmapBuilder
Bitwise-OR the current bitmap with the value from the other bitmap.- Specified by:
or
in interfaceBitmapIndex.Bitmap
- Specified by:
or
in interfaceBitmapIndex.BitmapBuilder
- Parameters:
other
- the other bitmap- Returns:
- the current builder.
-
andNot
Description copied from interface:BitmapIndex.BitmapBuilder
Bitwise-AND-NOT the current bitmap with the value from the other bitmap.- Specified by:
andNot
in interfaceBitmapIndex.Bitmap
- Specified by:
andNot
in interfaceBitmapIndex.BitmapBuilder
- Parameters:
other
- the other bitmap- Returns:
- the current builder.
-
xor
Description copied from interface:BitmapIndex.BitmapBuilder
Bitwise-XOR the current bitmap with the value from the other bitmap.- Specified by:
xor
in interfaceBitmapIndex.Bitmap
- Specified by:
xor
in interfaceBitmapIndex.BitmapBuilder
- Parameters:
other
- the other bitmap- Returns:
- the current builder.
-
build
- Specified by:
build
in interfaceBitmapIndex.BitmapBuilder
- Returns:
- the fully built immutable bitmap
-
iterator
Description copied from interface:BitmapIndex.Bitmap
Returns an iterator over a set of elements of type BitmapObject. The BitmapObject instance is reused across calls toIterator.next()
for performance reasons.- Specified by:
iterator
in interfaceBitmapIndex.Bitmap
- Specified by:
iterator
in interfaceIterable<BitmapObject>
- Returns:
- an Iterator.
-
cardinality
public int cardinality()- Specified by:
cardinality
in interfaceBitmapIndex.BitmapBuilder
- Returns:
- the number of elements in the bitmap.
-
removeAllOrNone
Description copied from interface:BitmapIndex.BitmapBuilder
Determines if the entire bitmap index is contained in the bitmap. If it is, the matching bits are removed from the bitmap and true is returned. If the bitmap index is null, false is returned.- Specified by:
removeAllOrNone
in interfaceBitmapIndex.BitmapBuilder
- Parameters:
index
- the bitmap index to check if it is completely contained inside of the current bitmap.- Returns:
true
if the bitmap index was a complete match.
-
getBitmapIndex
Description copied from interface:BitmapIndex.BitmapBuilder
Get the BitmapIndex for this BitmapBuilder.- Specified by:
getBitmapIndex
in interfaceBitmapIndex.BitmapBuilder
- Returns:
- the BitmapIndex for this BitmapBuilder
-
retrieveCompressed
public com.googlecode.javaewah.EWAHCompressedBitmap retrieveCompressed()Description copied from interface:BitmapIndex.Bitmap
Returns the corresponding raw compressed EWAH bitmap of the bitmap.- Specified by:
retrieveCompressed
in interfaceBitmapIndex.Bitmap
- Returns:
- the corresponding
EWAHCompressedBitmap
-
ewahBitmap
-