@Override public Bitmap aggregate(Iterable<Bitmap> bitmaps) { final Iterator<Bitmap> i = bitmaps.iterator(); EWAHCompressedBitmap bitmap = ((EwahBitmapWrapper) i.next()).bitmap; while (i.hasNext()) { bitmap = bitmap.and(((EwahBitmapWrapper) i.next()).bitmap); } return new EwahBitmapWrapper(bitmap); } };
return bitmaps[0]; if (bitmaps.length == 2) return bitmaps[0].and(bitmaps[1]);
@Override public Bitmap and(Bitmap other) { return new EwahBitmapWrapper(bitmap.and(((EwahBitmapWrapper) other).bitmap)); }
return bitmaps[0]; if (bitmaps.length == 2) return bitmaps[0].and(bitmaps[1]);
/** {@inheritDoc} */ @Override public EWAHCompressedBitmap ofObjectType( EWAHCompressedBitmap bitmap, int type) { switch (type) { case Constants.OBJ_BLOB: return blobs.and(bitmap); case Constants.OBJ_TREE: return trees.and(bitmap); case Constants.OBJ_COMMIT: return commits.and(bitmap); case Constants.OBJ_TAG: return tags.and(bitmap); } throw new IllegalArgumentException(); }
/** {@inheritDoc} */ @Override public EWAHCompressedBitmap ofObjectType( EWAHCompressedBitmap bitmap, int type) { switch (type) { case Constants.OBJ_BLOB: return getBlobs().and(bitmap); case Constants.OBJ_TREE: return getTrees().and(bitmap); case Constants.OBJ_COMMIT: return getCommits().and(bitmap); case Constants.OBJ_TAG: return getTags().and(bitmap); } throw new IllegalArgumentException(); }
@Override public EWAHCompressedBitmap ofObjectType( EWAHCompressedBitmap bitmap, int type) { switch (type) { case Constants.OBJ_BLOB: return blobs.and(bitmap); case Constants.OBJ_TREE: return trees.and(bitmap); case Constants.OBJ_COMMIT: return commits.and(bitmap); case Constants.OBJ_TAG: return tags.and(bitmap); } throw new IllegalArgumentException(); }
/** {@inheritDoc} */ @Override public EWAHCompressedBitmap ofObjectType( EWAHCompressedBitmap bitmap, int type) { switch (type) { case Constants.OBJ_BLOB: return blobs.and(bitmap); case Constants.OBJ_TREE: return trees.and(bitmap); case Constants.OBJ_COMMIT: return commits.and(bitmap); case Constants.OBJ_TAG: return tags.and(bitmap); } throw new IllegalArgumentException(); }
/** * Computes the logical <code>and</code> of the context bitmap * (<code>this</code>) and the given bitmap. * * @param rhs Bitmap to compute the logical <code>and</code> with. * @return Logical <code>and</code> of <code>this</code> bitmap * (context object) and the given bitmap. */ public SparseBitmap and(final SparseBitmap rhs) { return new SparseBitmap(this.bitmap.and(rhs.bitmap)); }
/** * Computes the logical <code>and</code> of the context bitmap * (<code>this</code>) and the given bitmap. * * @param rhs Bitmap to compute the logical <code>and</code> with. * @return Logical <code>and</code> of <code>this</code> bitmap * (context object) and the given bitmap. */ public SparseBitmap and(final SparseBitmap rhs) { return new SparseBitmap(this.bitmap.and(rhs.bitmap)); }
@Override public EWAHCompressedBitmap ofObjectType( EWAHCompressedBitmap bitmap, int type) { switch (type) { case Constants.OBJ_BLOB: return getBlobs().and(bitmap); case Constants.OBJ_TREE: return getTrees().and(bitmap); case Constants.OBJ_COMMIT: return getCommits().and(bitmap); case Constants.OBJ_TAG: return getTags().and(bitmap); } throw new IllegalArgumentException(); }
/** {@inheritDoc} */ @Override public EWAHCompressedBitmap ofObjectType( EWAHCompressedBitmap bitmap, int type) { switch (type) { case Constants.OBJ_BLOB: return getBlobs().and(bitmap); case Constants.OBJ_TREE: return getTrees().and(bitmap); case Constants.OBJ_COMMIT: return getCommits().and(bitmap); case Constants.OBJ_TAG: return getTags().and(bitmap); } throw new IllegalArgumentException(); }