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
()
| 208 | */ |
| 209 | |
| 210 | @CanIgnoreReturnValue |
| 211 | @GwtIncompatible // java.lang.ref.WeakReference |
| 212 | public MapMaker weakKeys() { |
| 213 | return setKeyStrength(Strength.WEAK); |
| 214 | } |
| 215 | |
| 216 | MapMaker setKeyStrength(Strength strength) { |
| 217 | checkState(keyStrength == null, "Key strength was already set to %s", keyStrength); |
no test coverage detected