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 BitmapIndexImplprivate 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()intbooleancontains(AnyObjectId objectId) Whether the bitmap has the id set.private com.googlecode.javaewah.EWAHCompressedBitmapewahBitmap(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.voidremove(AnyObjectId objectId) Remove the id from the bitmap.booleanremoveAllOrNone(PackBitmapIndex index) Determines if the entire bitmap index is contained in the bitmap.com.googlecode.javaewah.EWAHCompressedBitmapReturns 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, waitMethods 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.BitmapBuilderWhether the bitmap has the id set.- Specified by:
containsin interfaceBitmapIndex.BitmapBuilder- Parameters:
objectId- the object ID- Returns:
- whether the bitmap currently contains the object ID
-
addObject
Description copied from interface:BitmapIndex.BitmapBuilderAdds the id to the bitmap.- Specified by:
addObjectin interfaceBitmapIndex.BitmapBuilder- Parameters:
objectId- the object IDtype- the Git object type. SeeConstants.- Returns:
- the current builder.
-
remove
Description copied from interface:BitmapIndex.BitmapBuilderRemove the id from the bitmap.- Specified by:
removein interfaceBitmapIndex.BitmapBuilder- Parameters:
objectId- the object ID
-
or
Description copied from interface:BitmapIndex.BitmapBuilderBitwise-OR the current bitmap with the value from the other bitmap.- Specified by:
orin interfaceBitmapIndex.Bitmap- Specified by:
orin interfaceBitmapIndex.BitmapBuilder- Parameters:
other- the other bitmap- Returns:
- the current builder.
-
andNot
Description copied from interface:BitmapIndex.BitmapBuilderBitwise-AND-NOT the current bitmap with the value from the other bitmap.- Specified by:
andNotin interfaceBitmapIndex.Bitmap- Specified by:
andNotin interfaceBitmapIndex.BitmapBuilder- Parameters:
other- the other bitmap- Returns:
- the current builder.
-
xor
Description copied from interface:BitmapIndex.BitmapBuilderBitwise-XOR the current bitmap with the value from the other bitmap.- Specified by:
xorin interfaceBitmapIndex.Bitmap- Specified by:
xorin interfaceBitmapIndex.BitmapBuilder- Parameters:
other- the other bitmap- Returns:
- the current builder.
-
build
- Specified by:
buildin interfaceBitmapIndex.BitmapBuilder- Returns:
- the fully built immutable bitmap
-
iterator
Description copied from interface:BitmapIndex.BitmapReturns an iterator over a set of elements of type BitmapObject. The BitmapObject instance is reused across calls toIterator.next()for performance reasons.- Specified by:
iteratorin interfaceBitmapIndex.Bitmap- Specified by:
iteratorin interfaceIterable<BitmapObject>- Returns:
- an Iterator.
-
cardinality
public int cardinality()- Specified by:
cardinalityin interfaceBitmapIndex.BitmapBuilder- Returns:
- the number of elements in the bitmap.
-
removeAllOrNone
Description copied from interface:BitmapIndex.BitmapBuilderDetermines 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:
removeAllOrNonein interfaceBitmapIndex.BitmapBuilder- Parameters:
index- the bitmap index to check if it is completely contained inside of the current bitmap.- Returns:
trueif the bitmap index was a complete match.
-
getBitmapIndex
Description copied from interface:BitmapIndex.BitmapBuilderGet the BitmapIndex for this BitmapBuilder.- Specified by:
getBitmapIndexin interfaceBitmapIndex.BitmapBuilder- Returns:
- the BitmapIndex for this BitmapBuilder
-
retrieveCompressed
public com.googlecode.javaewah.EWAHCompressedBitmap retrieveCompressed()Description copied from interface:BitmapIndex.BitmapReturns the corresponding raw compressed EWAH bitmap of the bitmap.- Specified by:
retrieveCompressedin interfaceBitmapIndex.Bitmap- Returns:
- the corresponding
EWAHCompressedBitmap
-
ewahBitmap
-