Use BitmapBuilder#or or BitmapBuilder#addObject instead.
Change-Id: I4bd71a842cf9f6ba2f9a17015e8a36ac380bfd3a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
this.bitmapIndex = bitmapIndex;
}
- @Override
- public boolean add(AnyObjectId objectId, int type) {
- int position = bitmapIndex.findOrInsert(objectId, type);
- if (bitset.contains(position))
- return false;
-
- Bitmap entry = bitmapIndex.getBitmap(objectId);
- if (entry != null) {
- or(entry);
- return false;
- }
-
- bitset.set(position);
- return true;
- }
-
@Override
public boolean contains(AnyObjectId objectId) {
int position = bitmapIndex.findPosition(objectId);
* return a reference to the current builder.
*/
public interface BitmapBuilder extends Bitmap {
- /**
- * Adds the id and the existing bitmap for the id, if one exists, to the
- * bitmap.
- *
- * @param objectId
- * the object ID
- * @param type
- * the Git object type. See {@link Constants}.
- * @return true if the value was not contained or able to be loaded.
- * @deprecated use {@link #or} or {@link #addObject} instead.
- */
- @Deprecated
- boolean add(AnyObjectId objectId, int type);
/**
* Whether the bitmap has the id set.