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

Method weakKeys

corpus/java/training/guava/collect/MapMaker.java:205–209  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

203 * @see WeakReference
204 */
205 @CanIgnoreReturnValue
206 @GwtIncompatible // java.lang.ref.WeakReference
207 public MapMaker weakKeys() {
208 return setKeyStrength(Strength.WEAK);
209 }
210
211 MapMaker setKeyStrength(Strength strength) {
212 checkState(keyStrength == null, "Key strength was already set to %s", keyStrength);

Callers 5

tryWeakKeysMethod · 0.45
WeakInternerClass · 0.45
SubscriberRegistryClass · 0.45
LockGraphNodeClass · 0.45

Calls 1

setKeyStrengthMethod · 0.95

Tested by

no test coverage detected