예제 #1
0
파일: Bloom.java 프로젝트: tomgibara/bloom
 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);
 }
예제 #2
0
파일: Bloom.java 프로젝트: tomgibara/bloom
 public BloomSet<K> newSet() {
   BitStore bits = Bits.store(config.capacity());
   return new BloomSetImpl<>(bits, config);
 }