org.jboss.util.collection
Class SoftSet
java.lang.Object
org.jboss.util.collection.SoftSet
- All Implemented Interfaces:
- Iterable, Collection, Set
public class SoftSet
- extends Object
- implements Set
An implementation of Set that manages a map of soft references to
the set values. The map is keyed by the value hashCode and so this
is only useful for value whose hashCode is a valid identity
representation (String, primative wrappers, etc).
- Version:
- $Revision: 1.1 $
- Author:
- Scott.Stark@jboss.org
SoftSet
public SoftSet()
size
public int size()
- Specified by:
size in interface Collection- Specified by:
size in interface Set
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty in interface Collection- Specified by:
isEmpty in interface Set
contains
public boolean contains(Object o)
- Specified by:
contains in interface Collection- Specified by:
contains in interface Set
iterator
public Iterator iterator()
- Specified by:
iterator in interface Iterable- Specified by:
iterator in interface Collection- Specified by:
iterator in interface Set
toArray
public Object[] toArray()
- Specified by:
toArray in interface Collection- Specified by:
toArray in interface Set
toArray
public Object[] toArray(Object[] a)
- Specified by:
toArray in interface Collection- Specified by:
toArray in interface Set
add
public boolean add(Object o)
- Specified by:
add in interface Collection- Specified by:
add in interface Set
remove
public boolean remove(Object o)
- Specified by:
remove in interface Collection- Specified by:
remove in interface Set
containsAll
public boolean containsAll(Collection c)
- Specified by:
containsAll in interface Collection- Specified by:
containsAll in interface Set
addAll
public boolean addAll(Collection c)
- Specified by:
addAll in interface Collection- Specified by:
addAll in interface Set
retainAll
public boolean retainAll(Collection c)
- Specified by:
retainAll in interface Collection- Specified by:
retainAll in interface Set
removeAll
public boolean removeAll(Collection c)
- Specified by:
removeAll in interface Collection- Specified by:
removeAll in interface Set
clear
public void clear()
- Specified by:
clear in interface Collection- Specified by:
clear in interface Set
equals
public boolean equals(Object o)
- Specified by:
equals in interface Collection- Specified by:
equals in interface Set- Overrides:
equals in class Object
hashCode
public int hashCode()
- Specified by:
hashCode in interface Collection- Specified by:
hashCode in interface Set- Overrides:
hashCode in class Object
Copyright © 2002 JBoss Group, LLC. All Rights Reserved.