net.spy.util
Class SoftHashSet<T>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractSet<T>
net.spy.util.ReferenceSet<T>
net.spy.util.SoftHashSet<T>
- All Implemented Interfaces:
- Iterable<T>, Collection<T>, Set<T>
public class SoftHashSet<T>
- extends ReferenceSet<T>
Implementation of ReferenceSet that uses soft references.
|
Constructor Summary |
SoftHashSet()
Get an instance of SoftHashSet. |
SoftHashSet(Collection<T> 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<T> c)
- Get a SoftHashSet with the contents from the given Collection.
- Parameters:
c - the collection
getReference
protected Reference<T> getReference(T o)
- Return a soft reference.
- Specified by:
getReference in class ReferenceSet<T>
- Parameters:
o - an object
- Returns:
- a reference to that object
Copyright © 1995-2007 SPY Internetworking. All Rights Reserved.