Class WeakHashSet<T>

java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.util.WeakHashSet<T>

public class WeakHashSet<T> extends Object
A hashset whose values can be garbage collected.
  • Field Details

    • elementSize

      public int elementSize
  • Constructor Details

    • WeakHashSet

      public WeakHashSet()
    • WeakHashSet

      public WeakHashSet(int size)
  • Method Details

    • add

      public T add(T obj)
      Adds the given object to this set. If an object that is equals to the given object already exists, do nothing. Returns the existing object or the new object if not found.
    • contains

      public boolean contains(T obj)
    • get

      public T get(T obj)
      Return the object that is in this set and that is equals to the given object. Return null if not found.
    • remove

      public T remove(T obj)
      Removes the object that is in this set and that is equals to the given object. Return the object that was in the set, or null if not found.
    • size

      public int size()
    • toString

      public String toString()
      Overrides:
      toString in class Object