@Test public void iremove() { MappeableBitmapContainer bc = new MappeableBitmapContainer(); bc.iremove(1,13); assertEquals(0, bc.getCardinality()); }
@Override public MappeableContainer iremove(int begin, int end) { if (end == begin) { return this; } if ((begin > end) || (end > (1 << 16))) { throw new IllegalArgumentException("Invalid range [" + begin + "," + end + ")"); } int prevOnesInRange = cardinalityInRange(begin, end); BufferUtil.resetBitmapRange(bitmap, begin, end); updateCardinality(prevOnesInRange, 0); if (getCardinality() < MappeableArrayContainer.DEFAULT_MAX_SIZE) { return toArrayContainer(); } return this; }
MappeableBitmapContainer extends MappeableContainer implements Cloneable { @Override public MappeableContainer iremove(int begin, int end) { if (end == begin) { return this; } if ((begin > end) || (end > (1 << 16))) { throw new IllegalArgumentException("Invalid range [" + begin + "," + end + ")"); } int prevOnesInRange = cardinalityInRange(begin, end); BufferUtil.resetBitmapRange(bitmap, begin, end); updateCardinality(prevOnesInRange, 0); if (getCardinality() < MappeableArrayContainer.DEFAULT_MAX_SIZE) { return toArrayContainer(); } return this; } }
MappeableBitmapContainer extends MappeableContainer implements Cloneable { @Override public MappeableContainer iremove(int begin, int end) { if (end == begin) { return this; } if ((begin > end) || (end > (1 << 16))) { throw new IllegalArgumentException("Invalid range [" + begin + "," + end + ")"); } int prevOnesInRange = cardinalityInRange(begin, end); BufferUtil.resetBitmapRange(bitmap, begin, end); updateCardinality(prevOnesInRange, 0); if (getCardinality() < MappeableArrayContainer.DEFAULT_MAX_SIZE) { return toArrayContainer(); } return this; } MappeableBitmapContainer();  MappeableBitmapContainer(BitmapContainer bc);  MappeableBitmapContainer(final int firstOfRun, final int lastOfRun);   MappeableBitmapContainer(int newCardinality, LongBuffer newBitmap);  MappeableBitmapContainer(final LongBuffer array, final int initCardinality); }
MappeableBitmapContainer extends MappeableContainer implements Cloneable { @Override public MappeableContainer iremove(int begin, int end) { if (end == begin) { return this; } if ((begin > end) || (end > (1 << 16))) { throw new IllegalArgumentException("Invalid range [" + begin + "," + end + ")"); } int prevOnesInRange = cardinalityInRange(begin, end); BufferUtil.resetBitmapRange(bitmap, begin, end); updateCardinality(prevOnesInRange, 0); if (getCardinality() < MappeableArrayContainer.DEFAULT_MAX_SIZE) { return toArrayContainer(); } return this; } MappeableBitmapContainer();  MappeableBitmapContainer(BitmapContainer bc);  MappeableBitmapContainer(final int firstOfRun, final int lastOfRun);   MappeableBitmapContainer(int newCardinality, LongBuffer newBitmap);  MappeableBitmapContainer(final LongBuffer array, final int initCardinality); @Override MappeableContainer add(int begin, int end); @Override MappeableContainer add(final char i); @Override boolean isEmpty(); @Override MappeableArrayContainer and(final MappeableArrayContainer value2); @Override MappeableContainer and(final MappeableBitmapContainer value2); @Override MappeableContainer and(final MappeableRunContainer value2); @Override MappeableContainer andNot(final MappeableArrayContainer value2); @Override MappeableContainer andNot(final MappeableBitmapContainer value2); @Override MappeableContainer andNot(final MappeableRunContainer value2); @Override void clear(); @Override MappeableBitmapContainer clone(); @Override boolean contains(final char i); static boolean contains(ByteBuffer buf, int position, final char i); @Override boolean equals(Object o); @Override void fillLeastSignificant16bits(int[] x, int i, int mask); @Override MappeableContainer flip(char i); @Override int getCardinality(); @Override CharIterator getReverseCharIterator(); @Override PeekableCharIterator getCharIterator(); @Override ContainerBatchIterator getBatchIterator(); @Override int getSizeInBytes(); @Override int hashCode(); @Override MappeableContainer iadd(int begin, int end); @Override MappeableContainer iand(final MappeableArrayContainer b2); @Override MappeableContainer iand(final MappeableBitmapContainer b2); @Override MappeableContainer iand(final MappeableRunContainer x); @Override MappeableContainer iandNot(final MappeableArrayContainer b2); @Override MappeableContainer iandNot(final MappeableBitmapContainer b2); @Override MappeableContainer iandNot(final MappeableRunContainer x); @Override MappeableContainer inot(final int firstOfRange, final int lastOfRange); @Override boolean intersects(MappeableArrayContainer value2); @Override boolean intersects(MappeableBitmapContainer value2); @Override boolean intersects(MappeableRunContainer x); @Override MappeableBitmapContainer ior(final MappeableArrayContainer value2); @Override MappeableContainer ior(final MappeableBitmapContainer b2); @Override boolean isFull(); @Override MappeableContainer ior(final MappeableRunContainer x); @Override MappeableContainer iremove(int begin, int end); @Override Iterator<Character> iterator(); @Override MappeableContainer ixor(final MappeableArrayContainer value2); @Override MappeableContainer ixor(MappeableBitmapContainer b2); @Override MappeableContainer ixor(final MappeableRunContainer x); @Override MappeableContainer limit(int maxcardinality); int nextSetBit(final int i); @Override MappeableContainer not(final int firstOfRange, final int lastOfRange); @Override MappeableContainer or(final MappeableArrayContainer value2); @Override MappeableContainer or(final MappeableBitmapContainer value2); @Override MappeableContainer or(final MappeableRunContainer value2); @Override int rank(char lowbits); @Override void readExternal(ObjectInput in); @Override MappeableContainer remove(int begin, int end); @Override MappeableContainer remove(final char i); @Override MappeableContainer repairAfterLazy(); @Override MappeableContainer runOptimize(); @Override char select(int j); @Override int serializedSizeInBytes(); @Override Container toContainer(); long[] toLongArray(); @Override String toString(); @Override void trim(); @Override void writeExternal(ObjectOutput out); @Override MappeableContainer xor(final MappeableArrayContainer value2); @Override MappeableContainer xor(MappeableBitmapContainer value2); @Override MappeableContainer xor(final MappeableRunContainer value2); @Override void forEach(char msb, IntConsumer ic); @Override int andCardinality(final MappeableArrayContainer value2); @Override int andCardinality(final MappeableBitmapContainer value2); @Override int andCardinality(MappeableRunContainer x); @Override MappeableBitmapContainer toBitmapContainer(); @Override int first(); @Override int last(); @Override int nextValue(char fromValue); @Override int previousValue(char fromValue); @Override int nextAbsentValue(char fromValue); @Override int previousAbsentValue(char fromValue); @Override boolean intersects(int minimum, int supremum); @Override boolean contains(int minimum, int supremum); }
MappeableBitmapContainer extends MappeableContainer implements Cloneable { @Override public MappeableContainer iremove(int begin, int end) { if (end == begin) { return this; } if ((begin > end) || (end > (1 << 16))) { throw new IllegalArgumentException("Invalid range [" + begin + "," + end + ")"); } int prevOnesInRange = cardinalityInRange(begin, end); BufferUtil.resetBitmapRange(bitmap, begin, end); updateCardinality(prevOnesInRange, 0); if (getCardinality() < MappeableArrayContainer.DEFAULT_MAX_SIZE) { return toArrayContainer(); } return this; } MappeableBitmapContainer();  MappeableBitmapContainer(BitmapContainer bc);  MappeableBitmapContainer(final int firstOfRun, final int lastOfRun);   MappeableBitmapContainer(int newCardinality, LongBuffer newBitmap);  MappeableBitmapContainer(final LongBuffer array, final int initCardinality); @Override MappeableContainer add(int begin, int end); @Override MappeableContainer add(final char i); @Override boolean isEmpty(); @Override MappeableArrayContainer and(final MappeableArrayContainer value2); @Override MappeableContainer and(final MappeableBitmapContainer value2); @Override MappeableContainer and(final MappeableRunContainer value2); @Override MappeableContainer andNot(final MappeableArrayContainer value2); @Override MappeableContainer andNot(final MappeableBitmapContainer value2); @Override MappeableContainer andNot(final MappeableRunContainer value2); @Override void clear(); @Override MappeableBitmapContainer clone(); @Override boolean contains(final char i); static boolean contains(ByteBuffer buf, int position, final char i); @Override boolean equals(Object o); @Override void fillLeastSignificant16bits(int[] x, int i, int mask); @Override MappeableContainer flip(char i); @Override int getCardinality(); @Override CharIterator getReverseCharIterator(); @Override PeekableCharIterator getCharIterator(); @Override ContainerBatchIterator getBatchIterator(); @Override int getSizeInBytes(); @Override int hashCode(); @Override MappeableContainer iadd(int begin, int end); @Override MappeableContainer iand(final MappeableArrayContainer b2); @Override MappeableContainer iand(final MappeableBitmapContainer b2); @Override MappeableContainer iand(final MappeableRunContainer x); @Override MappeableContainer iandNot(final MappeableArrayContainer b2); @Override MappeableContainer iandNot(final MappeableBitmapContainer b2); @Override MappeableContainer iandNot(final MappeableRunContainer x); @Override MappeableContainer inot(final int firstOfRange, final int lastOfRange); @Override boolean intersects(MappeableArrayContainer value2); @Override boolean intersects(MappeableBitmapContainer value2); @Override boolean intersects(MappeableRunContainer x); @Override MappeableBitmapContainer ior(final MappeableArrayContainer value2); @Override MappeableContainer ior(final MappeableBitmapContainer b2); @Override boolean isFull(); @Override MappeableContainer ior(final MappeableRunContainer x); @Override MappeableContainer iremove(int begin, int end); @Override Iterator<Character> iterator(); @Override MappeableContainer ixor(final MappeableArrayContainer value2); @Override MappeableContainer ixor(MappeableBitmapContainer b2); @Override MappeableContainer ixor(final MappeableRunContainer x); @Override MappeableContainer limit(int maxcardinality); int nextSetBit(final int i); @Override MappeableContainer not(final int firstOfRange, final int lastOfRange); @Override MappeableContainer or(final MappeableArrayContainer value2); @Override MappeableContainer or(final MappeableBitmapContainer value2); @Override MappeableContainer or(final MappeableRunContainer value2); @Override int rank(char lowbits); @Override void readExternal(ObjectInput in); @Override MappeableContainer remove(int begin, int end); @Override MappeableContainer remove(final char i); @Override MappeableContainer repairAfterLazy(); @Override MappeableContainer runOptimize(); @Override char select(int j); @Override int serializedSizeInBytes(); @Override Container toContainer(); long[] toLongArray(); @Override String toString(); @Override void trim(); @Override void writeExternal(ObjectOutput out); @Override MappeableContainer xor(final MappeableArrayContainer value2); @Override MappeableContainer xor(MappeableBitmapContainer value2); @Override MappeableContainer xor(final MappeableRunContainer value2); @Override void forEach(char msb, IntConsumer ic); @Override int andCardinality(final MappeableArrayContainer value2); @Override int andCardinality(final MappeableBitmapContainer value2); @Override int andCardinality(MappeableRunContainer x); @Override MappeableBitmapContainer toBitmapContainer(); @Override int first(); @Override int last(); @Override int nextValue(char fromValue); @Override int previousValue(char fromValue); @Override int nextAbsentValue(char fromValue); @Override int previousAbsentValue(char fromValue); @Override boolean intersects(int minimum, int supremum); @Override boolean contains(int minimum, int supremum);  }