net.spy.util
Class SoftHashSet
java.lang.Object
java.util.AbstractCollection
java.util.AbstractSet
net.spy.util.ReferenceSet
net.spy.util.SoftHashSet
- All Implemented Interfaces:
- Collection, Set
- public class SoftHashSet
- extends ReferenceSet
Implementation of ReferenceSet that uses soft references.
|
Constructor Summary |
SoftHashSet()
Get an instance of SoftHashSet. |
SoftHashSet(Collection c)
Get a SoftHashSet with the contents from the given Collection. |
SoftHashSet(int n)
Create a SoftHashSet with the given capacity. |
SoftHashSet
public SoftHashSet()
- Get an instance of SoftHashSet.
SoftHashSet
public SoftHashSet(int n)
- Create a SoftHashSet with the given capacity.
- Parameters:
n - the capacity
SoftHashSet
public SoftHashSet(Collection c)
- Get a SoftHashSet with the contents from the given Collection.
- Parameters:
c - the collection
getReference
protected Reference getReference(Object o)
- Return a soft reference.
- Specified by:
getReference in class ReferenceSet
- Parameters:
o - an object
- Returns:
- a reference to that object