Top Description Inners Methods
org.eclipse.jgit.lib

public Interface BitmapIndex

Known Direct Implementers
org.eclipse.jgit.internal.storage.file.BitmapIndexImpl
Imports
java.util.Iterator, org.eclipse.jgit.internal.storage.file.PackBitmapIndex, com.googlecode.javaewah.EWAHCompressedBitmap

A compressed bitmap representation of the entire object graph.
Since
3.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
BitmapIndex.Bitmap

A bitmap representation of ObjectIds that can be iterated to return the underlying ObjectIds or operated on with other Bitmaps.

public static interface
BitmapIndex.BitmapBuilder

A builder for a bitmap.

public static interface

Method Summary

Modifier and TypeMethod and Description
public default void
addBitmapLookupListener(BitmapIndex.BitmapLookupListener
instance listening to lookup events in the index. Never null. Set to BitmapLookupListener#NOOP to disable.
listener
)

Report to this listener whether getBitmap(AnyObjectId) finds a commit.

public BitmapIndex.Bitmap

Returns:

the Bitmap for the objectId or null, if one does not exist.
getBitmap
(AnyObjectId
the object ID
objectId
)

Get the bitmap for the id. The returned bitmap is immutable and the bitwise operations return the result of the operation in a new Bitmap.

public BitmapIndex.BitmapBuilder

Returns:

a new BitmapBuilder based on the values in the index.
newBitmapBuilder
()

Create a new BitmapBuilder based on the values in the index.

Method Detail

addBitmapLookupListenerback to summary
public default void addBitmapLookupListener(BitmapIndex.BitmapLookupListener listener)

Report to this listener whether getBitmap(AnyObjectId) finds a commit.

Parameters
listener:BitmapIndex.BitmapLookupListener

instance listening to lookup events in the index. Never null. Set to BitmapLookupListener#NOOP to disable.

Since
6.8
getBitmapback to summary
public BitmapIndex.Bitmap getBitmap(AnyObjectId objectId)

Get the bitmap for the id. The returned bitmap is immutable and the bitwise operations return the result of the operation in a new Bitmap.

Parameters
objectId:AnyObjectId

the object ID

Returns:BitmapIndex.Bitmap

the Bitmap for the objectId or null, if one does not exist.

newBitmapBuilderback to summary
public BitmapIndex.BitmapBuilder newBitmapBuilder()

Create a new BitmapBuilder based on the values in the index.

Returns:BitmapIndex.BitmapBuilder

a new BitmapBuilder based on the values in the index.

org.eclipse.jgit.lib back to summary

public Interface BitmapIndex.Bitmap

extends Iterable<BitmapObject>
Known Direct Subinterfaces
org.eclipse.jgit.lib.BitmapIndex.BitmapBuilder
Known Direct Implementers
org.eclipse.jgit.internal.storage.file.BitmapIndexImpl.CompressedBitmap

A bitmap representation of ObjectIds that can be iterated to return the underlying ObjectIds or operated on with other Bitmaps.

Method Summary

Modifier and TypeMethod and Description
public BitmapIndex.Bitmap

Returns:

a bitmap that is the bitwise-AND-NOT.
andNot
(BitmapIndex.Bitmap
the other bitmap
other
)

Bitwise-AND-NOT the current bitmap with the value from the other bitmap.

public Iterator<BitmapObject>

Returns:

an Iterator.
iterator
()

Redeclares java.lang.Iterable.iterator.

Returns an iterator over a set of elements of type BitmapObject.

public BitmapIndex.Bitmap

Returns:

a bitmap that is the bitwise-OR.
or
(BitmapIndex.Bitmap
the other bitmap
other
)

Bitwise-OR the current bitmap with the value from the other bitmap.

public EWAHCompressedBitmap

Returns:

the corresponding EWAHCompressedBitmap
retrieveCompressed
()

Returns the corresponding raw compressed EWAH bitmap of the bitmap.

public BitmapIndex.Bitmap

Returns:

a bitmap that is the bitwise-XOR.
xor
(BitmapIndex.Bitmap
the other bitmap
other
)

Bitwise-XOR the current bitmap with the value from the other bitmap.

Inherited from java.lang.Iterable:
forEachspliterator

Method Detail

andNotback to summary
public BitmapIndex.Bitmap andNot(BitmapIndex.Bitmap other)

Bitwise-AND-NOT the current bitmap with the value from the other bitmap.

Parameters
other:BitmapIndex.Bitmap

the other bitmap

Returns:BitmapIndex.Bitmap

a bitmap that is the bitwise-AND-NOT.

iteratorback to summary
public Iterator<BitmapObject> iterator()

Redeclares java.lang.Iterable.iterator.

Returns an iterator over a set of elements of type BitmapObject. The BitmapObject instance is reused across calls to Iterator#next() for performance reasons.

Returns:Iterator<BitmapObject>

an Iterator.

Annotations
@Override
orback to summary
public BitmapIndex.Bitmap or(BitmapIndex.Bitmap other)

Bitwise-OR the current bitmap with the value from the other bitmap.

Parameters
other:BitmapIndex.Bitmap

the other bitmap

Returns:BitmapIndex.Bitmap

a bitmap that is the bitwise-OR.

retrieveCompressedback to summary
public EWAHCompressedBitmap retrieveCompressed()

Returns the corresponding raw compressed EWAH bitmap of the bitmap.

Returns:EWAHCompressedBitmap

the corresponding EWAHCompressedBitmap

Since
5.8
xorback to summary
public BitmapIndex.Bitmap xor(BitmapIndex.Bitmap other)

Bitwise-XOR the current bitmap with the value from the other bitmap.

Parameters
other:BitmapIndex.Bitmap

the other bitmap

Returns:BitmapIndex.Bitmap

a bitmap that is the bitwise-XOR.

org.eclipse.jgit.lib back to summary

public Interface BitmapIndex.BitmapBuilder

extends Bitmap
Known Direct Implementers
org.eclipse.jgit.internal.storage.file.BitmapIndexImpl.CompressedBitmapBuilder

A builder for a bitmap. The bitwise operations update the builder and return a reference to the current builder.

Method Summary

Modifier and TypeMethod and Description
public BitmapIndex.BitmapBuilder

Returns:

the current builder.
addObject
(AnyObjectId
the object ID
objectId
,
int
the Git object type. See Constants.
type
)

Adds the id to the bitmap.

public BitmapIndex.BitmapBuilder

Returns:

the current builder.
andNot
(BitmapIndex.Bitmap
the other bitmap
other
)

Redeclares org.eclipse.jgit.lib.BitmapIndex.Bitmap.andNot.

Bitwise-AND-NOT the current bitmap with the value from the other bitmap.

public BitmapIndex.Bitmap

Returns:

the fully built immutable bitmap
build
()

Build the bitmap

public int

Returns:

the number of elements in the bitmap.
cardinality
()

Get number of elements in the bitmap

public boolean

Returns:

whether the bitmap currently contains the object ID
contains
(AnyObjectId
the object ID
objectId
)

Whether the bitmap has the id set.

public BitmapIndex

Returns:

the BitmapIndex for this BitmapBuilder
getBitmapIndex
()

Get the BitmapIndex for this BitmapBuilder.

public BitmapIndex.BitmapBuilder

Returns:

the current builder.
or
(BitmapIndex.Bitmap
the other bitmap
other
)

Redeclares org.eclipse.jgit.lib.BitmapIndex.Bitmap.or.

Bitwise-OR the current bitmap with the value from the other bitmap.

public void
remove(AnyObjectId
the object ID
objectId
)

Remove the id from the bitmap.

public boolean

Returns:

true if the bitmap index was a complete match.
removeAllOrNone
(PackBitmapIndex
the bitmap index to check if it is completely contained inside of the current bitmap.
bitmapIndex
)

Determines if the entire bitmap index is contained in the bitmap.

public BitmapIndex.BitmapBuilder

Returns:

the current builder.
xor
(BitmapIndex.Bitmap
the other bitmap
other
)

Redeclares org.eclipse.jgit.lib.BitmapIndex.Bitmap.xor.

Bitwise-XOR the current bitmap with the value from the other bitmap.

Inherited from org.eclipse.jgit.lib.BitmapIndex.Bitmap:
iteratorretrieveCompressed

Method Detail

addObjectback to summary
public BitmapIndex.BitmapBuilder addObject(AnyObjectId objectId, int type)

Adds the id to the bitmap.

Parameters
objectId:AnyObjectId

the object ID

type:int

the Git object type. See Constants.

Returns:BitmapIndex.BitmapBuilder

the current builder.

Since
4.2
andNotback to summary
public BitmapIndex.BitmapBuilder andNot(BitmapIndex.Bitmap other)

Redeclares org.eclipse.jgit.lib.BitmapIndex.Bitmap.andNot.

Bitwise-AND-NOT the current bitmap with the value from the other bitmap.

Parameters
other:BitmapIndex.Bitmap

the other bitmap

Returns:BitmapIndex.BitmapBuilder

the current builder.

Annotations
@Override
buildback to summary
public BitmapIndex.Bitmap build()

Build the bitmap

Returns:BitmapIndex.Bitmap

the fully built immutable bitmap

cardinalityback to summary
public int cardinality()

Get number of elements in the bitmap

Returns:int

the number of elements in the bitmap.

containsback to summary
public boolean contains(AnyObjectId objectId)

Whether the bitmap has the id set.

Parameters
objectId:AnyObjectId

the object ID

Returns:boolean

whether the bitmap currently contains the object ID

getBitmapIndexback to summary
public BitmapIndex getBitmapIndex()

Get the BitmapIndex for this BitmapBuilder.

Returns:BitmapIndex

the BitmapIndex for this BitmapBuilder

Since
4.2
orback to summary
public BitmapIndex.BitmapBuilder or(BitmapIndex.Bitmap other)

Redeclares org.eclipse.jgit.lib.BitmapIndex.Bitmap.or.

Bitwise-OR the current bitmap with the value from the other bitmap.

Parameters
other:BitmapIndex.Bitmap

the other bitmap

Returns:BitmapIndex.BitmapBuilder

the current builder.

Annotations
@Override
removeback to summary
public void remove(AnyObjectId objectId)

Remove the id from the bitmap.

Parameters
objectId:AnyObjectId

the object ID

removeAllOrNoneback to summary
public 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:PackBitmapIndex

the bitmap index to check if it is completely contained inside of the current bitmap.

Returns:boolean

true if the bitmap index was a complete match.

xorback to summary
public BitmapIndex.BitmapBuilder xor(BitmapIndex.Bitmap other)

Redeclares org.eclipse.jgit.lib.BitmapIndex.Bitmap.xor.

Bitwise-XOR the current bitmap with the value from the other bitmap.

Parameters
other:BitmapIndex.Bitmap

the other bitmap

Returns:BitmapIndex.BitmapBuilder

the current builder.

Annotations
@Override
org.eclipse.jgit.lib back to summary

public Interface BitmapIndex.BitmapLookupListener


Report the results of getBitmap(AnyObjectId)
Since
6.8

Field Summary

Modifier and TypeField and Description
public static final BitmapIndex.BitmapLookupListener
NOOP

No-op instance

Method Summary

Modifier and TypeMethod and Description
public void
onBitmapFound(AnyObjectId
object id
oid
)

This object has a bitmap in the index

public void
onBitmapNotFound(AnyObjectId
object id
oid
)

This object does not have a bitmap in the index

Field Detail

NOOPback to summary
public static final BitmapIndex.BitmapLookupListener NOOP

No-op instance

Method Detail

onBitmapFoundback to summary
public void onBitmapFound(AnyObjectId oid)

This object has a bitmap in the index

Parameters
oid:AnyObjectId

object id

onBitmapNotFoundback to summary
public void onBitmapNotFound(AnyObjectId oid)

This object does not have a bitmap in the index

Parameters
oid:AnyObjectId

object id