|
||||||||||
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 net.ontopia.utils.PoolableSet
public class PoolableSet
INTERNAL: The default PoolableSet implementation. This is class is used by the default SetPool implementation.
Field Summary | |
---|---|
protected int |
hc
|
protected int |
hc_modCount
|
protected int |
refcount
|
Fields inherited from class net.ontopia.utils.CompactHashSet |
---|
deletedObject, elements, freecells, INITIAL_SIZE, LOAD_FACTOR, modCount, nullObject, objects |
Constructor Summary | |
---|---|
PoolableSet()
|
|
PoolableSet(java.util.Collection c)
|
|
PoolableSet(CompactHashSet s)
|
|
PoolableSet(int size)
|
Method Summary | |
---|---|
boolean |
_add(java.lang.Object o)
|
boolean |
_remove(java.lang.Object o)
|
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. |
int |
dereferenced(SetPoolIF pool)
INTERNAL: Decrement and return reference count. |
boolean |
equalsAdd(java.util.Set other,
java.lang.Object o)
INTERNAL: Returns true if the given set will be equal to this set if the given object had been added to this set. |
boolean |
equalsRemove(java.util.Set other,
java.lang.Object o)
INTERNAL: Returns true if the given set will be equal to this set if the given object had been removed from this set. |
int |
getReferenceCount()
INTERNAL: Return the current reference count. |
int |
hashCode()
|
int |
referenced(SetPoolIF pool)
INTERNAL: Increment and return reference count. |
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)
|
java.lang.String |
toString()
|
Methods inherited from class net.ontopia.utils.CompactHashSet |
---|
contains, dump, isEmpty, iterator, rehash, rehash, size, toArray, toArray |
Methods inherited from class java.util.AbstractSet |
---|
equals |
Methods inherited from class java.util.AbstractCollection |
---|
containsAll |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Set |
---|
contains, containsAll, equals, isEmpty, iterator, size, toArray, toArray |
Field Detail |
---|
protected int refcount
protected int hc
protected int hc_modCount
Constructor Detail |
---|
public PoolableSet()
public PoolableSet(int size)
public PoolableSet(java.util.Collection c)
public PoolableSet(CompactHashSet s)
Method Detail |
---|
public boolean _add(java.lang.Object o)
public boolean _remove(java.lang.Object o)
public int getReferenceCount()
PoolableSetIF
getReferenceCount
in interface PoolableSetIF
public int referenced(SetPoolIF pool)
PoolableSetIF
referenced
in interface PoolableSetIF
public int dereferenced(SetPoolIF pool)
PoolableSetIF
dereferenced
in interface PoolableSetIF
public boolean equalsAdd(java.util.Set other, java.lang.Object o)
PoolableSetIF
equalsAdd
in interface PoolableSetIF
public boolean equalsRemove(java.util.Set other, java.lang.Object o)
PoolableSetIF
equalsRemove
in interface PoolableSetIF
public boolean add(java.lang.Object o)
CompactHashSet
add
in interface java.util.Collection
add
in interface java.util.Set
add
in class CompactHashSet
o
- element to be added to this set.
public boolean remove(java.lang.Object o)
CompactHashSet
remove
in interface java.util.Collection
remove
in interface java.util.Set
remove
in class CompactHashSet
public boolean addAll(java.util.Collection coll)
addAll
in interface java.util.Collection
addAll
in interface java.util.Set
addAll
in class java.util.AbstractCollection
public boolean removeAll(java.util.Collection coll)
removeAll
in interface java.util.Collection
removeAll
in interface java.util.Set
removeAll
in class java.util.AbstractSet
public boolean retainAll(java.util.Collection coll)
retainAll
in interface java.util.Collection
retainAll
in interface java.util.Set
retainAll
in class java.util.AbstractCollection
public void clear()
CompactHashSet
clear
in interface java.util.Collection
clear
in interface java.util.Set
clear
in class CompactHashSet
public java.lang.String toString()
toString
in class java.util.AbstractCollection
public int hashCode()
hashCode
in interface java.util.Collection
hashCode
in interface java.util.Set
hashCode
in class java.util.AbstractSet
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |