< prev index next >

src/java.base/share/classes/jdk/internal/util/ReferencedKeyMap.java

Print this page
*** 46,10 ***
--- 46,11 ---
  /**
   * This class provides management of {@link Map maps} where it is desirable to
   * remove entries automatically when the key is garbage collected. This is
   * accomplished by using a backing map where the keys are either a
   * {@link WeakReference} or a {@link SoftReference}.
+  * Keys must be {@linkplain Class#isIdentity() identity objects.}
   * <p>
   * To create a {@link ReferencedKeyMap} the user must provide a {@link Supplier}
   * of the backing map and whether {@link WeakReference} or
   * {@link SoftReference} is to be used.
   *
< prev index next >