public class PackBitmapIndexRemapper extends PackBitmapIndex implements Iterable<PackBitmapIndexRemapper.Entry>
Modifier and Type | Class and Description |
---|---|
class |
PackBitmapIndexRemapper.Entry
An entry in the old PackBitmapIndex.
|
FLAG_REUSE
Modifier and Type | Method and Description |
---|---|
int |
findPosition(AnyObjectId objectId)
Finds the position in the bitmap of the object.
|
com.googlecode.javaewah.EWAHCompressedBitmap |
getBitmap(AnyObjectId objectId)
Returns the previously constructed bitmap for the object.
|
int |
getBitmapCount()
Returns the number of bitmaps in this bitmap index.
|
ObjectId |
getObject(int position)
Get the object at the bitmap position.
|
int |
getObjectCount()
Obtain the total number of objects described by this index.
|
Iterator<PackBitmapIndexRemapper.Entry> |
iterator() |
static PackBitmapIndexRemapper |
newPackBitmapIndex(BitmapIndex prevBitmapIndex,
PackBitmapIndex newIndex)
A PackBitmapIndex that maps the positions in the prevBitmapIndex to the
ones in the newIndex.
|
com.googlecode.javaewah.EWAHCompressedBitmap |
ofObjectType(com.googlecode.javaewah.EWAHCompressedBitmap bitmap,
int type)
Returns a bitmap containing positions for objects that have the given Git
type.
|
open, read
public static PackBitmapIndexRemapper newPackBitmapIndex(BitmapIndex prevBitmapIndex, PackBitmapIndex newIndex)
prevBitmapIndex
- the bitmap index with the old mapping.newIndex
- the bitmap index with the new mapping.public int findPosition(AnyObjectId objectId)
PackBitmapIndex
findPosition
in class PackBitmapIndex
objectId
- the id for which the bitmap position will be found.public ObjectId getObject(int position) throws IllegalArgumentException
PackBitmapIndex
getObject
in class PackBitmapIndex
position
- the id for which the object will be found.IllegalArgumentException
- when the item is not found.public int getObjectCount()
PackBitmapIndex
getObjectCount() - 1
is the largest bit that will be set in a
bitmap.getObjectCount
in class PackBitmapIndex
public com.googlecode.javaewah.EWAHCompressedBitmap ofObjectType(com.googlecode.javaewah.EWAHCompressedBitmap bitmap, int type)
PackBitmapIndex
ofObjectType
in class PackBitmapIndex
bitmap
- the object bitmap.type
- the Git type.public Iterator<PackBitmapIndexRemapper.Entry> iterator()
iterator
in interface Iterable<PackBitmapIndexRemapper.Entry>
public com.googlecode.javaewah.EWAHCompressedBitmap getBitmap(AnyObjectId objectId)
PackBitmapIndex
getBitmap
in class PackBitmapIndex
objectId
- the id for which the bitmap will be found.public int getBitmapCount()
PackBitmapIndex
getBitmapCount
in class PackBitmapIndex
Copyright © 2016 Eclipse JGit Project. All rights reserved.