Interface BitmapFactory
-
- All Known Implementing Classes:
BitSetBitmapFactory,ConciseBitmapFactory,RoaringBitmapFactory
public interface BitmapFactory
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ImmutableBitmapcomplement(ImmutableBitmap b, int length)ImmutableBitmapintersection(Iterable<ImmutableBitmap> b)Compute the intersection (bitwise-AND) of a set of bitmaps.ImmutableBitmapmakeEmptyImmutableBitmap()MutableBitmapmakeEmptyMutableBitmap()Create a new empty bitmapImmutableBitmapmakeImmutableBitmap(MutableBitmap mutableBitmap)ImmutableBitmapmapImmutableBitmap(ByteBuffer b)Given a ByteBuffer pointing at a serialized version of a bitmap, instantiate an immutable mapped bitmap.ImmutableBitmapunion(Iterable<ImmutableBitmap> b)Compute the union (bitwise-OR) of a set of bitmaps.
-
-
-
Method Detail
-
makeEmptyMutableBitmap
MutableBitmap makeEmptyMutableBitmap()
Create a new empty bitmap- Returns:
- the new bitmap
-
makeEmptyImmutableBitmap
ImmutableBitmap makeEmptyImmutableBitmap()
-
makeImmutableBitmap
ImmutableBitmap makeImmutableBitmap(MutableBitmap mutableBitmap)
-
mapImmutableBitmap
ImmutableBitmap mapImmutableBitmap(ByteBuffer b)
Given a ByteBuffer pointing at a serialized version of a bitmap, instantiate an immutable mapped bitmap. When using RoaringBitmap (with the RoaringBitmapFactory class), it is not necessary for b.limit() to indicate the end of the serialized content whereas it is critical to set b.limit() appropriately with ConciseSet (with the ConciseBitmapFactory).- Parameters:
b- the input byte buffer- Returns:
- the new bitmap
-
union
ImmutableBitmap union(Iterable<ImmutableBitmap> b)
Compute the union (bitwise-OR) of a set of bitmaps. They are assumed to be instances of of the proper WrappedConciseBitmap otherwise a ClassCastException is thrown.- Parameters:
b- input ImmutableGenericBitmap objects- Returns:
- the union.
- Throws:
ClassCastException- if one of the ImmutableGenericBitmap objects if not an instance of WrappedImmutableConciseBitmap
-
intersection
ImmutableBitmap intersection(Iterable<ImmutableBitmap> b)
Compute the intersection (bitwise-AND) of a set of bitmaps. They are assumed to be instances of the proper WrappedConciseBitmap otherwise a ClassCastException is thrown.- Parameters:
b- input ImmutableGenericBitmap objects- Returns:
- the union.
- Throws:
ClassCastException- if one of the ImmutableGenericBitmap objects if not an instance of WrappedImmutableConciseBitmap
-
complement
ImmutableBitmap complement(ImmutableBitmap b, int length)
-
-