Class ObjectSet<Key>


  • public final class ObjectSet<Key>
    extends java.lang.Object
    A weak set of objects. Like an ordinary weak set, this set does not prevent its keys from being discarded by the garbage collector. Unlike an ordinary weak set, this set can be used (keeps the stored values) even inside the value's finalize() method.
    • Constructor Summary

      Constructors 
      Constructor Description
      ObjectSet()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(Key object)  
      boolean addFirst​(Key object)  
      boolean contains​(Key object)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ObjectSet

        public ObjectSet()
    • Method Detail

      • add

        public void add​(@NotNull
                        Key object)
      • addFirst

        public boolean addFirst​(@NotNull
                                Key object)
        Returns:
        true if the object was added to the set, false if the set already contained the object
      • contains

        public boolean contains​(@NotNull
                                Key object)