ecologylab.generic
Class HashSetWriteSynch<K>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractSet<E>
java.util.HashSet<K>
ecologylab.generic.HashSetWriteSynch<K>
- Type Parameters:
K - V -
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<K>, java.util.Collection<K>, java.util.Set<K>
public class HashSetWriteSynch<K>
- extends java.util.HashSet<K>
Hashed data structure with synchronized writes/deletes and unsynchronized reads.
- Author:
- andruid, robinson
- See Also:
- Serialized Form
|
Method Summary |
boolean |
add(K key)
Sycnhronizes add. |
boolean |
addAll(java.util.Collection<? extends K> c)
Sycnhronizes if you add another set to this one. |
boolean |
remove(java.lang.Object key)
Sycnhronizes remove. |
| Methods inherited from class java.util.HashSet |
clear, clone, contains, isEmpty, iterator, size |
| Methods inherited from class java.util.AbstractSet |
equals, hashCode, removeAll |
| Methods inherited from class java.util.AbstractCollection |
containsAll, retainAll, toArray, toArray, toString |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Set |
containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray |
HashSetWriteSynch
public HashSetWriteSynch(int arg0,
float arg1)
HashSetWriteSynch
public HashSetWriteSynch(int arg0)
HashSetWriteSynch
public HashSetWriteSynch()
HashSetWriteSynch
public HashSetWriteSynch(java.util.Collection<? extends K> collection)
add
public boolean add(K key)
- Sycnhronizes add.
- Specified by:
add in interface java.util.Collection<K>- Specified by:
add in interface java.util.Set<K>- Overrides:
add in class java.util.HashSet<K>
remove
public boolean remove(java.lang.Object key)
- Sycnhronizes remove.
- Specified by:
remove in interface java.util.Collection<K>- Specified by:
remove in interface java.util.Set<K>- Overrides:
remove in class java.util.HashSet<K>
addAll
public boolean addAll(java.util.Collection<? extends K> c)
- Sycnhronizes if you add another set to this one.
- Specified by:
addAll in interface java.util.Collection<K>- Specified by:
addAll in interface java.util.Set<K>- Overrides:
addAll in class java.util.AbstractCollection<K>