MCPcopy Create free account
hub / github.com/antlr/codebuff / weakKeys

Method weakKeys

output/java_guava/1.4.13/CacheBuilder.java:536–539  ·  view source on GitHub ↗

Specifies that each key (not value) stored in the cache should be wrapped in a WeakReference (by default, strong references are used). Warning: when this method is used, the resulting cache will use identity (==) comparison to determine equality of keys. Entries with k

()

Source from the content-addressed store, hash-verified

534 */
535
536 @GwtIncompatible // java.lang.ref.WeakReference
537 public CacheBuilder<K, V> weakKeys() {
538 return setKeyStrength(Strength.WEAK);
539 }
540
541 CacheBuilder<K, V> setKeyStrength(Strength strength) {
542 checkState(keyStrength == null, "Key strength was already set to %s", keyStrength);

Callers 1

toCacheBuilderMethod · 0.45

Calls 1

setKeyStrengthMethod · 0.95

Tested by

no test coverage detected