Package org.eclipse.jgit.lib
Interface BitmapIndex.BitmapBuilder
-
- All Superinterfaces:
BitmapIndex.Bitmap
,Iterable<BitmapObject>
- Enclosing interface:
- BitmapIndex
public static interface BitmapIndex.BitmapBuilder extends BitmapIndex.Bitmap
A builder for a bitmap. The bitwise operations update the builder and return a reference to the current builder.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BitmapIndex.BitmapBuilder
addObject(AnyObjectId objectId, int type)
Adds the id to the bitmap.BitmapIndex.BitmapBuilder
andNot(BitmapIndex.Bitmap other)
Bitwise-AND-NOT the current bitmap with the value from the other bitmap.BitmapIndex.Bitmap
build()
int
cardinality()
boolean
contains(AnyObjectId objectId)
Whether the bitmap has the id set.BitmapIndex
getBitmapIndex()
Get the BitmapIndex for this BitmapBuilder.BitmapIndex.BitmapBuilder
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 bitmapIndex)
Determines if the entire bitmap index is contained in the bitmap.BitmapIndex.BitmapBuilder
xor(BitmapIndex.Bitmap other)
Bitwise-XOR the current bitmap with the value from the other bitmap.-
Methods inherited from interface org.eclipse.jgit.lib.BitmapIndex.Bitmap
iterator, retrieveCompressed
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
contains
boolean contains(AnyObjectId objectId)
Whether the bitmap has the id set.- Parameters:
objectId
- the object ID- Returns:
- whether the bitmap currently contains the object ID
-
addObject
BitmapIndex.BitmapBuilder addObject(AnyObjectId objectId, int type)
Adds the id to the bitmap.- Parameters:
objectId
- the object IDtype
- the Git object type. SeeConstants
.- Returns:
- the current builder.
- Since:
- 4.2
-
remove
void remove(AnyObjectId objectId)
Remove the id from the bitmap.- Parameters:
objectId
- the object ID
-
or
BitmapIndex.BitmapBuilder or(BitmapIndex.Bitmap other)
Bitwise-OR the current bitmap with the value from the other bitmap.- Specified by:
or
in interfaceBitmapIndex.Bitmap
- Parameters:
other
- the other bitmap- Returns:
- the current builder.
-
andNot
BitmapIndex.BitmapBuilder andNot(BitmapIndex.Bitmap other)
Bitwise-AND-NOT the current bitmap with the value from the other bitmap.- Specified by:
andNot
in interfaceBitmapIndex.Bitmap
- Parameters:
other
- the other bitmap- Returns:
- the current builder.
-
xor
BitmapIndex.BitmapBuilder xor(BitmapIndex.Bitmap other)
Bitwise-XOR the current bitmap with the value from the other bitmap.- Specified by:
xor
in interfaceBitmapIndex.Bitmap
- Parameters:
other
- the other bitmap- Returns:
- the current builder.
-
build
BitmapIndex.Bitmap build()
- Returns:
- the fully built immutable bitmap
-
removeAllOrNone
boolean removeAllOrNone(PackBitmapIndex bitmapIndex)
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.- Parameters:
bitmapIndex
- 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.
-
cardinality
int cardinality()
- Returns:
- the number of elements in the bitmap.
-
getBitmapIndex
BitmapIndex getBitmapIndex()
Get the BitmapIndex for this BitmapBuilder.- Returns:
- the BitmapIndex for this BitmapBuilder
- Since:
- 4.2
-
-