|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.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(Collection c)
|
|
SynchronizedCompactHashSet(int size)
|
|
| Method Summary | ||
|---|---|---|
boolean |
add(Object o)
Adds the specified element to this set if it is not already present. |
|
boolean |
addAll(Collection coll)
|
|
void |
clear()
Removes all of the elements from this set. |
|
boolean |
contains(Object o)
Returns true if this set contains the specified element. |
|
boolean |
containsAll(Collection coll)
|
|
boolean |
equals(Object o)
|
|
int |
hashCode()
|
|
boolean |
isEmpty()
Returns true if this set contains no elements. |
|
Iterator<E> |
iterator()
Returns an iterator over the elements in this set. |
|
boolean |
remove(Object o)
Removes the specified element from the set. |
|
boolean |
removeAll(Collection coll)
|
|
boolean |
retainAll(Collection coll)
|
|
int |
size()
Returns the number of elements in this set (its cardinality). |
|
Object[] |
toArray()
|
|
|
toArray(E[] a)
|
|
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(Collection c)
public SynchronizedCompactHashSet(int size)
| Method Detail |
|---|
public int size()
CompactHashSet
size in interface Collection<E>size in interface Set<E>size in class CompactHashSet<E>public boolean isEmpty()
CompactHashSet
isEmpty in interface Collection<E>isEmpty in interface Set<E>isEmpty in class CompactHashSet<E>public boolean contains(Object o)
CompactHashSet
contains in interface Collection<E>contains in interface Set<E>contains in class CompactHashSet<E>o - element whose presence in this set is to be tested.
public Object[] toArray()
toArray in interface Collection<E>toArray in interface Set<E>toArray in class CompactHashSet<E>public <E> E[] toArray(E[] a)
toArray in interface Collection<E>toArray in interface Set<E>toArray in class CompactHashSet<E>public Iterator<E> iterator()
CompactHashSet
iterator in interface Iterable<E>iterator in interface Collection<E>iterator in interface Set<E>iterator in class CompactHashSet<E>ConcurrentModificationExceptionpublic boolean add(Object o)
CompactHashSet
add in interface Collection<E>add in interface Set<E>add in class CompactHashSet<E>o - element to be added to this set.
public boolean remove(Object o)
CompactHashSet
remove in interface Collection<E>remove in interface Set<E>remove in class CompactHashSet<E>public boolean containsAll(Collection coll)
containsAll in interface Collection<E>containsAll in interface Set<E>containsAll in class AbstractCollection<E>public boolean addAll(Collection coll)
addAll in interface Collection<E>addAll in interface Set<E>addAll in class AbstractCollection<E>public boolean removeAll(Collection coll)
removeAll in interface Collection<E>removeAll in interface Set<E>removeAll in class AbstractSet<E>public boolean retainAll(Collection coll)
retainAll in interface Collection<E>retainAll in interface Set<E>retainAll in class AbstractCollection<E>public void clear()
CompactHashSet
clear in interface Collection<E>clear in interface Set<E>clear in class CompactHashSet<E>public String toString()
toString in class AbstractCollection<E>public boolean equals(Object o)
equals in interface Collection<E>equals in interface Set<E>equals in class AbstractSet<E>public int hashCode()
hashCode in interface Collection<E>hashCode in interface Set<E>hashCode in class AbstractSet<E>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||