|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractCollection<E> java.util.AbstractSet<E> net.ontopia.utils.CompactHashSet<E> net.ontopia.utils.SynchronizedCompactHashSet<E>
public class SynchronizedCompactHashSet<E>
INTERNAL: Extends CompactHashSet to make it synchronized. Saves memory compared with having to wrap the set in a SynchronizedSet.
Field Summary |
---|
Fields inherited from class net.ontopia.utils.CompactHashSet |
---|
deletedObject, elements, freecells, INITIAL_SIZE, LOAD_FACTOR, modCount, nullObject, objects |
Constructor Summary | |
---|---|
SynchronizedCompactHashSet()
|
|
SynchronizedCompactHashSet(java.util.Collection c)
|
|
SynchronizedCompactHashSet(int size)
|
Method Summary | ||
---|---|---|
boolean |
add(java.lang.Object o)
Adds the specified element to this set if it is not already present. |
|
boolean |
addAll(java.util.Collection coll)
|
|
void |
clear()
Removes all of the elements from this set. |
|
boolean |
contains(java.lang.Object o)
Returns true if this set contains the specified element. |
|
boolean |
containsAll(java.util.Collection coll)
|
|
boolean |
equals(java.lang.Object o)
|
|
int |
hashCode()
|
|
boolean |
isEmpty()
Returns true if this set contains no elements. |
|
java.util.Iterator<E> |
iterator()
Returns an iterator over the elements in this set. |
|
boolean |
remove(java.lang.Object o)
Removes the specified element from the set. |
|
boolean |
removeAll(java.util.Collection coll)
|
|
boolean |
retainAll(java.util.Collection coll)
|
|
int |
size()
Returns the number of elements in this set (its cardinality). |
|
java.lang.Object[] |
toArray()
|
|
|
toArray(E[] a)
|
|
java.lang.String |
toString()
|
Methods inherited from class net.ontopia.utils.CompactHashSet |
---|
dump, rehash, rehash |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SynchronizedCompactHashSet()
public SynchronizedCompactHashSet(java.util.Collection c)
public SynchronizedCompactHashSet(int size)
Method Detail |
---|
public int size()
CompactHashSet
size
in interface java.util.Collection<E>
size
in interface java.util.Set<E>
size
in class CompactHashSet<E>
public boolean isEmpty()
CompactHashSet
isEmpty
in interface java.util.Collection<E>
isEmpty
in interface java.util.Set<E>
isEmpty
in class CompactHashSet<E>
public boolean contains(java.lang.Object o)
CompactHashSet
contains
in interface java.util.Collection<E>
contains
in interface java.util.Set<E>
contains
in class CompactHashSet<E>
o
- element whose presence in this set is to be tested.
public java.lang.Object[] toArray()
toArray
in interface java.util.Collection<E>
toArray
in interface java.util.Set<E>
toArray
in class CompactHashSet<E>
public <E> E[] toArray(E[] a)
toArray
in interface java.util.Collection<E>
toArray
in interface java.util.Set<E>
toArray
in class CompactHashSet<E>
public java.util.Iterator<E> iterator()
CompactHashSet
iterator
in interface java.lang.Iterable<E>
iterator
in interface java.util.Collection<E>
iterator
in interface java.util.Set<E>
iterator
in class CompactHashSet<E>
ConcurrentModificationException
public boolean add(java.lang.Object o)
CompactHashSet
add
in interface java.util.Collection<E>
add
in interface java.util.Set<E>
add
in class CompactHashSet<E>
o
- element to be added to this set.
public boolean remove(java.lang.Object o)
CompactHashSet
remove
in interface java.util.Collection<E>
remove
in interface java.util.Set<E>
remove
in class CompactHashSet<E>
public boolean containsAll(java.util.Collection coll)
containsAll
in interface java.util.Collection<E>
containsAll
in interface java.util.Set<E>
containsAll
in class java.util.AbstractCollection<E>
public boolean addAll(java.util.Collection coll)
addAll
in interface java.util.Collection<E>
addAll
in interface java.util.Set<E>
addAll
in class java.util.AbstractCollection<E>
public boolean removeAll(java.util.Collection coll)
removeAll
in interface java.util.Collection<E>
removeAll
in interface java.util.Set<E>
removeAll
in class java.util.AbstractSet<E>
public boolean retainAll(java.util.Collection coll)
retainAll
in interface java.util.Collection<E>
retainAll
in interface java.util.Set<E>
retainAll
in class java.util.AbstractCollection<E>
public void clear()
CompactHashSet
clear
in interface java.util.Collection<E>
clear
in interface java.util.Set<E>
clear
in class CompactHashSet<E>
public java.lang.String toString()
toString
in class java.util.AbstractCollection<E>
public boolean equals(java.lang.Object o)
equals
in interface java.util.Collection<E>
equals
in interface java.util.Set<E>
equals
in class java.util.AbstractSet<E>
public int hashCode()
hashCode
in interface java.util.Collection<E>
hashCode
in interface java.util.Set<E>
hashCode
in class java.util.AbstractSet<E>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |