Simpler lambdas
This commit is contained in:
parent
e37d375d83
commit
0801d0d4ca
|
@ -143,9 +143,7 @@ public abstract class AbstractBloomFilterTest<T extends BloomFilter> {
|
|||
for (final long l : values) {
|
||||
lst.add(l);
|
||||
}
|
||||
assertTrue(f.forEachBitMap(l -> {
|
||||
return lst.remove(Long.valueOf(l));
|
||||
}));
|
||||
assertTrue(f.forEachBitMap(l -> lst.remove(Long.valueOf(l))));
|
||||
assertTrue(lst.isEmpty());
|
||||
}
|
||||
// values too large
|
||||
|
|
|
@ -55,7 +55,7 @@ public class BitMapProducerFromIndexProducerTest extends AbstractBitMapProducerT
|
|||
public final void testFromIndexProducer() {
|
||||
final List<Long> lst = new ArrayList<>();
|
||||
createProducer().forEachBitMap(lst::add);
|
||||
final long[] buckets = lst.stream().mapToLong(l -> l.longValue()).toArray();
|
||||
final long[] buckets = lst.stream().mapToLong(Long::longValue).toArray();
|
||||
assertTrue(BitMap.contains(buckets, 0));
|
||||
assertTrue(BitMap.contains(buckets, 1));
|
||||
assertTrue(BitMap.contains(buckets, 63));
|
||||
|
|
|
@ -103,7 +103,7 @@ public class DefaultBloomFilterTest extends AbstractBloomFilterTest<DefaultBloom
|
|||
|
||||
@Override
|
||||
public boolean contains(final IndexProducer indexProducer) {
|
||||
return indexProducer.forEachIndex((i) -> indices.contains(i));
|
||||
return indexProducer.forEachIndex(i -> indices.contains(i));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue