@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)); } }
@Override public Store<Boolean> range(int from, int to) { return new BitsStore(bits.range(from, to)); }
@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()); }
@Override public void fill(Boolean value) { if (value == null) throw new IllegalArgumentException("null value"); bits.setAll(value); }
@Override public Boolean set(int index, Boolean value) { if (value == null) throw new IllegalArgumentException("null value"); return bits.getThenSetBit(index, value); }
@Override public void forEach(Consumer<? super Boolean> action) { bits.asList().forEach(action); }
@Override boolean fastFill(int from, int to, Boolean value) { bits.range(from, to).setAll(value); return true; }
@Override public Store<Boolean> immutableView() { return isMutable() ? new BitsStore(bits.immutableView()) : this; }
@Override public Store<Boolean> immutableCopy() { return new BitsStore(bits.immutableCopy()); }
@Override public boolean isMutable() { return bits.isMutable(); }
@Override public void transpose(int i, int j) { bits.permute().transpose(i, j); }
@Override public List<Boolean> asList() { return bits.asList(); }
@Override public Boolean get(int index) { return bits.getBit(index); }
public BloomSet<K> newSet(BitStore bits) { if (bits == null) throw new IllegalArgumentException("null bits"); return new BloomSetImpl<>(bits, config.withCapacity(bits.size())); }
@Override public Iterator<Boolean> iterator() { return bits.asList().iterator(); }