use of org.roaringbitmap.IntConsumer in project RoaringBitmap by RoaringBitmap.
the class TestMappeableArrayContainer method foreach.
@Test
public void foreach() {
MappeableContainer ac = newArrayContainer(0, 64);
ac.forEach((short) 0, new IntConsumer() {
int expected = 0;
@Override
public void accept(int value) {
assertEquals(value, expected++);
}
});
}
use of org.roaringbitmap.IntConsumer in project RoaringBitmap by RoaringBitmap.
the class MapBenchmark method testMap.
@BenchmarkMode(Mode.AverageTime)
@Benchmark
public RoaringBitmap testMap(BenchmarkState benchmarkState) {
final RoaringBitmap answer = new RoaringBitmap();
benchmarkState.bitmap.forEach(new IntConsumer() {
@Override
public void accept(int value) {
answer.add(inttointmap(value));
}
});
return answer;
}
Aggregations