Class BitmapIndexImpl.CompressedBitmapBuilder
- java.lang.Object
-
- org.eclipse.jgit.internal.storage.file.BitmapIndexImpl.CompressedBitmapBuilder
-
- All Implemented Interfaces:
java.lang.Iterable<BitmapObject>,BitmapIndex.Bitmap,BitmapIndex.BitmapBuilder
- Enclosing class:
- BitmapIndexImpl
private static final class BitmapIndexImpl.CompressedBitmapBuilder extends java.lang.Object implements BitmapIndex.BitmapBuilder
-
-
Field Summary
Fields Modifier and Type Field Description private BitmapIndexImplbitmapIndexprivate BitmapIndexImpl.ComboBitsetbitset
-
Constructor Summary
Constructors Constructor Description CompressedBitmapBuilder(BitmapIndexImpl bitmapIndex)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BitmapIndex.BitmapBuilderaddObject(AnyObjectId objectId, int type)Adds the id to the bitmap.BitmapIndexImpl.CompressedBitmapBuilderandNot(BitmapIndex.Bitmap other)Bitwise-AND-NOT the current bitmap with the value from the other bitmap.BitmapIndexImpl.CompressedBitmapbuild()intcardinality()booleancontains(AnyObjectId objectId)Whether the bitmap has the id set.private com.googlecode.javaewah.EWAHCompressedBitmapewahBitmap(BitmapIndex.Bitmap other)BitmapIndexImplgetBitmapIndex()Get the BitmapIndex for this BitmapBuilder.java.util.Iterator<BitmapObject>iterator()Returns an iterator over a set of elements of type BitmapObject.BitmapIndexImpl.CompressedBitmapBuilderor(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.EWAHCompressedBitmapretrieveCompressed()Returns the corresponding raw compressed EWAH bitmap of the bitmap.BitmapIndexImpl.CompressedBitmapBuilderxor(BitmapIndex.Bitmap other)Bitwise-XOR the current bitmap with the value from the other bitmap.
-
-
-
Field Detail
-
bitset
private BitmapIndexImpl.ComboBitset bitset
-
bitmapIndex
private final BitmapIndexImpl bitmapIndex
-
-
Constructor Detail
-
CompressedBitmapBuilder
CompressedBitmapBuilder(BitmapIndexImpl bitmapIndex)
-
-
Method Detail
-
contains
public boolean contains(AnyObjectId objectId)
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
public BitmapIndex.BitmapBuilder addObject(AnyObjectId objectId, int type)
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
public void remove(AnyObjectId objectId)
Description copied from interface:BitmapIndex.BitmapBuilderRemove the id from the bitmap.- Specified by:
removein interfaceBitmapIndex.BitmapBuilder- Parameters:
objectId- the object ID
-
or
public BitmapIndexImpl.CompressedBitmapBuilder or(BitmapIndex.Bitmap other)
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
public BitmapIndexImpl.CompressedBitmapBuilder andNot(BitmapIndex.Bitmap other)
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
public BitmapIndexImpl.CompressedBitmapBuilder xor(BitmapIndex.Bitmap other)
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
public BitmapIndexImpl.CompressedBitmap build()
- Specified by:
buildin interfaceBitmapIndex.BitmapBuilder- Returns:
- the fully built immutable bitmap
-
iterator
public java.util.Iterator<BitmapObject> 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 interfacejava.lang.Iterable<BitmapObject>- Returns:
- an Iterator.
-
cardinality
public int cardinality()
- Specified by:
cardinalityin interfaceBitmapIndex.BitmapBuilder- Returns:
- the number of elements in the bitmap.
-
removeAllOrNone
public boolean removeAllOrNone(PackBitmapIndex index)
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
public BitmapIndexImpl 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
private com.googlecode.javaewah.EWAHCompressedBitmap ewahBitmap(BitmapIndex.Bitmap other)
-
-