@Test public void testPreviousAbsentEvenBits() { BitmapContainer container = new BitmapContainer(evenBits(), 1 << 15); for (int i = 0; i < 1 << 10; i+=2) { assertEquals(i - 1, container.previousAbsentValue((char)i)); assertEquals(i + 1, container.previousAbsentValue((char)(i+1))); } }
@Override public int previousAbsentValue(char fromValue) { return prevClearBit((fromValue)); }
BitmapContainer extends Container implements Cloneable { @Override public int previousAbsentValue(char fromValue) { return prevClearBit((fromValue)); } }
BitmapContainer extends Container implements Cloneable { @Override public int previousAbsentValue(char fromValue) { return prevClearBit((fromValue)); } BitmapContainer();  BitmapContainer(final int firstOfRun, final int lastOfRun); private  BitmapContainer(int newCardinality, long[] newBitmap);  BitmapContainer(long[] newBitmap, int newCardinality);  BitmapContainer(MappeableBitmapContainer bc); }
BitmapContainer extends Container implements Cloneable { @Override public int previousAbsentValue(char fromValue) { return prevClearBit((fromValue)); } BitmapContainer();  BitmapContainer(final int firstOfRun, final int lastOfRun); private  BitmapContainer(int newCardinality, long[] newBitmap);  BitmapContainer(long[] newBitmap, int newCardinality);  BitmapContainer(MappeableBitmapContainer bc); static CharIterator getReverseShortIterator(long[] bitmap); static PeekableCharIterator getShortIterator(long[] bitmap); @Override Container add(int begin, int end); @Override Container add(final char i); @Override ArrayContainer and(final ArrayContainer value2); @Override Container and(final BitmapContainer value2); @Override Container and(RunContainer x); @Override int andCardinality(final ArrayContainer value2); @Override int andCardinality(final BitmapContainer value2); @Override int andCardinality(RunContainer x); @Override Container andNot(final ArrayContainer value2); @Override Container andNot(final BitmapContainer value2); @Override Container andNot(RunContainer x); @Override void clear(); @Override BitmapContainer clone(); @Override boolean isEmpty(); @Override boolean contains(final char i); @Override boolean contains(int minimum, int supremum); @Override void deserialize(DataInput in); @Override boolean equals(Object o); @Override void fillLeastSignificant16bits(int[] x, int i, int mask); @Override Container flip(char i); @Override int getArraySizeInBytes(); @Override int getCardinality(); @Override CharIterator getReverseCharIterator(); @Override PeekableCharIterator getCharIterator(); @Override PeekableCharRankIterator getCharRankIterator(); @Override ContainerBatchIterator getBatchIterator(); @Override int getSizeInBytes(); @Override int hashCode(); @Override Container iadd(int begin, int end); @Override Container iand(final ArrayContainer b2); @Override Container iand(final BitmapContainer b2); @Override Container iand(RunContainer x); @Override Container iandNot(final ArrayContainer b2); @Override Container iandNot(final BitmapContainer b2); @Override Container iandNot(RunContainer x); @Override Container inot(final int firstOfRange, final int lastOfRange); @Override boolean intersects(ArrayContainer value2); @Override boolean intersects(BitmapContainer value2); @Override boolean intersects(RunContainer x); @Override boolean intersects(int minimum, int supremum); @Override BitmapContainer ior(final ArrayContainer value2); @Override Container ior(final BitmapContainer b2); @Override Container ior(RunContainer x); @Override Container iremove(int begin, int end); @Override Iterator<Character> iterator(); @Override Container ixor(final ArrayContainer value2); @Override Container ixor(BitmapContainer b2); @Override Container ixor(RunContainer x); @Override Container limit(int maxcardinality); int nextSetBit(final int i); @Override Container not(final int firstOfRange, final int lastOfRange); int numberOfRunsAdjustment(); int numberOfRunsLowerBound(int mustNotExceed); @Override Container or(final ArrayContainer value2); @Override boolean isFull(); @Override Container or(final BitmapContainer value2); @Override Container or(RunContainer x); @Override int rank(char lowbits); @Override void readExternal(ObjectInput in); @Override Container remove(int begin, int end); @Override Container remove(final char i); @Override Container repairAfterLazy(); @Override Container runOptimize(); @Override char select(int j); @Override void serialize(DataOutput out); @Override int serializedSizeInBytes(); LongBuffer toLongBuffer(); @Override MappeableContainer toMappeableContainer(); @Override String toString(); @Override void trim(); @Override void writeArray(DataOutput out); @Override void writeArray(ByteBuffer buffer); @Override void writeExternal(ObjectOutput out); @Override Container xor(final ArrayContainer value2); @Override Container xor(BitmapContainer value2); @Override Container xor(RunContainer x); @Override void forEach(char msb, IntConsumer ic); @Override BitmapContainer toBitmapContainer(); @Override int nextValue(char fromValue); @Override int previousValue(char fromValue); @Override int nextAbsentValue(char fromValue); @Override int previousAbsentValue(char fromValue); @Override int first(); @Override int last(); }
BitmapContainer extends Container implements Cloneable { @Override public int previousAbsentValue(char fromValue) { return prevClearBit((fromValue)); } BitmapContainer();  BitmapContainer(final int firstOfRun, final int lastOfRun); private  BitmapContainer(int newCardinality, long[] newBitmap);  BitmapContainer(long[] newBitmap, int newCardinality);  BitmapContainer(MappeableBitmapContainer bc); static CharIterator getReverseShortIterator(long[] bitmap); static PeekableCharIterator getShortIterator(long[] bitmap); @Override Container add(int begin, int end); @Override Container add(final char i); @Override ArrayContainer and(final ArrayContainer value2); @Override Container and(final BitmapContainer value2); @Override Container and(RunContainer x); @Override int andCardinality(final ArrayContainer value2); @Override int andCardinality(final BitmapContainer value2); @Override int andCardinality(RunContainer x); @Override Container andNot(final ArrayContainer value2); @Override Container andNot(final BitmapContainer value2); @Override Container andNot(RunContainer x); @Override void clear(); @Override BitmapContainer clone(); @Override boolean isEmpty(); @Override boolean contains(final char i); @Override boolean contains(int minimum, int supremum); @Override void deserialize(DataInput in); @Override boolean equals(Object o); @Override void fillLeastSignificant16bits(int[] x, int i, int mask); @Override Container flip(char i); @Override int getArraySizeInBytes(); @Override int getCardinality(); @Override CharIterator getReverseCharIterator(); @Override PeekableCharIterator getCharIterator(); @Override PeekableCharRankIterator getCharRankIterator(); @Override ContainerBatchIterator getBatchIterator(); @Override int getSizeInBytes(); @Override int hashCode(); @Override Container iadd(int begin, int end); @Override Container iand(final ArrayContainer b2); @Override Container iand(final BitmapContainer b2); @Override Container iand(RunContainer x); @Override Container iandNot(final ArrayContainer b2); @Override Container iandNot(final BitmapContainer b2); @Override Container iandNot(RunContainer x); @Override Container inot(final int firstOfRange, final int lastOfRange); @Override boolean intersects(ArrayContainer value2); @Override boolean intersects(BitmapContainer value2); @Override boolean intersects(RunContainer x); @Override boolean intersects(int minimum, int supremum); @Override BitmapContainer ior(final ArrayContainer value2); @Override Container ior(final BitmapContainer b2); @Override Container ior(RunContainer x); @Override Container iremove(int begin, int end); @Override Iterator<Character> iterator(); @Override Container ixor(final ArrayContainer value2); @Override Container ixor(BitmapContainer b2); @Override Container ixor(RunContainer x); @Override Container limit(int maxcardinality); int nextSetBit(final int i); @Override Container not(final int firstOfRange, final int lastOfRange); int numberOfRunsAdjustment(); int numberOfRunsLowerBound(int mustNotExceed); @Override Container or(final ArrayContainer value2); @Override boolean isFull(); @Override Container or(final BitmapContainer value2); @Override Container or(RunContainer x); @Override int rank(char lowbits); @Override void readExternal(ObjectInput in); @Override Container remove(int begin, int end); @Override Container remove(final char i); @Override Container repairAfterLazy(); @Override Container runOptimize(); @Override char select(int j); @Override void serialize(DataOutput out); @Override int serializedSizeInBytes(); LongBuffer toLongBuffer(); @Override MappeableContainer toMappeableContainer(); @Override String toString(); @Override void trim(); @Override void writeArray(DataOutput out); @Override void writeArray(ByteBuffer buffer); @Override void writeExternal(ObjectOutput out); @Override Container xor(final ArrayContainer value2); @Override Container xor(BitmapContainer value2); @Override Container xor(RunContainer x); @Override void forEach(char msb, IntConsumer ic); @Override BitmapContainer toBitmapContainer(); @Override int nextValue(char fromValue); @Override int previousValue(char fromValue); @Override int nextAbsentValue(char fromValue); @Override int previousAbsentValue(char fromValue); @Override int first(); @Override int last(); static final int MAX_CAPACITY; }