Lines Matching refs:strategy

64    * A strategy to translate T instances, to {@code numHashFunctions} bit indexes.
85 * Identifier used to encode this strategy, when marshalled as part of a BloomFilter.
88 * negative values are reserved for any custom, stateful strategy we may define
89 * (e.g. any kind of strategy that would depend on user input).
104 * The strategy we employ to map an element T to {@code numHashFunctions} bit indexes.
106 private final Strategy strategy;
112 Strategy strategy) {
120 this.strategy = checkNotNull(strategy);
130 return new BloomFilter<T>(bits.copy(), numHashFunctions, funnel, strategy);
138 return strategy.mightContain(object, funnel, numHashFunctions, bits);
164 return strategy.put(object, funnel, numHashFunctions, bits);
198 * <li>have the same strategy
210 (this.strategy.equals(that.strategy)) &&
233 checkArgument(this.strategy.equals(that.strategy),
235 this.strategy, that.strategy);
252 && this.strategy.equals(that.strategy);
259 return Objects.hashCode(numHashFunctions, funnel, strategy, bits);
293 Funnel<? super T> funnel, int expectedInsertions /* n */, double fpp, Strategy strategy) {
299 checkNotNull(strategy);
313 return new BloomFilter<T>(new BitArray(numBits), numHashFunctions, funnel, strategy);
394 final Strategy strategy;
400 this.strategy = bf.strategy;
403 return new BloomFilter<T>(new BitArray(data), numHashFunctions, funnel, strategy);
418 * 1 signed byte for the strategy
424 dout.writeByte(SignedBytes.checkedCast(strategy.ordinal()));
459 Strategy strategy = BloomFilterStrategies.values()[strategyOrdinal];
464 return new BloomFilter<T>(new BitArray(data), numHashFunctions, funnel, strategy);