示例#1
0
 @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));
   }
 }
示例#2
0
 public BloomSet<K> newSet(BitStore bits) {
   if (bits == null) throw new IllegalArgumentException("null bits");
   return new BloomSetImpl<>(bits, config.withCapacity(bits.size()));
 }
示例#3
0
 @Override
 public BitStore population() {
   return Bits.oneBits(bits.size());
 }
示例#4
0
 @Override
 public int count() {
   return bits.size();
 }
示例#5
0
 @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());
 }