| org.netbeans.modules.cnd.utils.cache.WeakSharedSet
WeakSharedSet | public class WeakSharedSet extends AbstractSet implements Set<E>(Code) | | This class provides storage functionality with Weak-referenced entries and
one new method addOrGet (backed by a hash table)
Access to set should be syncronized if used from different threads
See Also: WeakSharedSet.addOrGet(Object) author: Vladimir Voskresensky |
Constructor Summary | |
public | WeakSharedSet(int initialCapacity, float loadFactor) Constructs a new, empty WeakSharedSet with the given initial
capacity and the given load factor. | public | WeakSharedSet(int initialCapacity) Constructs a new, empty WeakSharedSet with the given initial
capacity and the default load factor (0.75). | public | WeakSharedSet() Constructs a new, empty WeakSharedSet with the default initial
capacity (16) and load factor (0.75). | public | WeakSharedSet(Set<? extends E> s) Constructs a new WeakSharedSet with the same mappings as the
specified map. |
WeakSharedSet | public WeakSharedSet(int initialCapacity, float loadFactor)(Code) | | Constructs a new, empty WeakSharedSet with the given initial
capacity and the given load factor.
Parameters: initialCapacity - The initial capacity of the WeakSharedSet Parameters: loadFactor - The load factor of the WeakSharedSet throws: IllegalArgumentException - if the initial capacity is negative,or if the load factor is nonpositive. |
WeakSharedSet | public WeakSharedSet(int initialCapacity)(Code) | | Constructs a new, empty WeakSharedSet with the given initial
capacity and the default load factor (0.75).
Parameters: initialCapacity - The initial capacity of the WeakSharedSet throws: IllegalArgumentException - if the initial capacity is negative |
WeakSharedSet | public WeakSharedSet()(Code) | | Constructs a new, empty WeakSharedSet with the default initial
capacity (16) and load factor (0.75).
|
WeakSharedSet | public WeakSharedSet(Set<? extends E> s)(Code) | | Constructs a new WeakSharedSet with the same mappings as the
specified map. The WeakSharedSet is created with the default
load factor (0.75) and an initial capacity sufficient to hold the
mappings in the specified map.
Parameters: m - the map whose mappings are to be placed in this map throws: NullPointerException - if the specified map is null |
add | public boolean add(E e)(Code) | | it is expected that method addOrGet is used instead of add
|
addOrGet | public E addOrGet(E e)(Code) | | Put object in this set if equal one is not yet in set.
Returns previous set entry if equal object is already in set.
Parameters: e - object to put in set. the previous set entry equals with e, orpassed object e if there were not entry in set. |
clear | public void clear()(Code) | | |
hashCode | public int hashCode()(Code) | | |
isEmpty | public boolean isEmpty()(Code) | | |
resize | public void resize(int newCapacity)(Code) | | |
toArray | public T[] toArray(T[] a)(Code) | | |
|
|