Class WeakSet<T>

All Implemented Interfaces:
Serializable, Cloneable, Iterable<T>, Collection<T>, Set<T>

public class WeakSet<T> extends AbstractSet<T> implements Serializable, Cloneable
A weak set for entries that will be automatically removed when no references to them are existing any more.
See Also:
  • Field Details

    • set

      protected transient Set set
      The set which will be used for element storage.
    • queue

      protected transient ReferenceQueue queue
      The reference queue used to get object removal notifications.
    • serialized_set

      protected Set serialized_set
  • Constructor Details

    • WeakSet

      public WeakSet()
      Construct a WeakSet based on a HashSet.
  • Method Details