public <V> BloomMap<K, V> newMap(Storage<V> storage, Lattice<V> lattice) { if (storage == null) throw new IllegalArgumentException("null storage"); if (lattice == null) throw new IllegalArgumentException("null lattice"); if (!lattice.isBoundedBelow()) throw new IllegalArgumentException("lattice not bounded below"); Store<V> values = storage.newStore(config.capacity()); if (values.type().nullGettable()) throw new IllegalArgumentException("null values possible"); return new BloomMapImpl<K, V>(config, values, lattice); }
public BloomSet<K> newSet() { BitStore bits = Bits.store(config.capacity()); return new BloomSetImpl<>(bits, config); }