@Override public void forEach(BiConsumer<Integer, ? super Boolean> action) { int size = bits.size(); for (int i = 0; i < size; i++) { action.accept(i, get(size)); } }
public BloomSet<K> newSet(BitStore bits) { if (bits == null) throw new IllegalArgumentException("null bits"); return new BloomSetImpl<>(bits, config.withCapacity(bits.size())); }
@Override public BitStore population() { return Bits.oneBits(bits.size()); }
@Override public int count() { return bits.size(); }
@Override public Store<Boolean> resizedCopy(int newSize) { if (newSize > bits.size()) throw new IllegalArgumentException("cannot enlarge, null not settable"); return new BitsStore(bits.range(0, newSize).mutableCopy()); }