|
||||||||||
| 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
net.ontopia.utils.SetPool
public class SetPool
INTERNAL: The default SetPool implementation.
| Field Summary | |
|---|---|
protected PoolableSetFactoryIF |
factory
|
protected int |
hc
|
protected int |
hc_modCount
|
| Fields inherited from class net.ontopia.utils.CompactHashSet |
|---|
deletedObject, elements, freecells, INITIAL_SIZE, LOAD_FACTOR, modCount, nullObject, objects |
| Constructor Summary | |
|---|---|
SetPool()
|
|
SetPool(Collection c)
|
|
SetPool(Collection c,
PoolableSetFactoryIF factory)
|
|
SetPool(int size)
|
|
SetPool(int size,
PoolableSetFactoryIF factory)
|
|
SetPool(PoolableSetFactoryIF factory)
|
|
| Method Summary | |
|---|---|
boolean |
add(Object o)
Adds the specified element to this set if it is not already present. |
Set |
add(Set set,
Object o,
boolean dereference)
INTERNAL: Return a set that is the result of adding the given object from the given set. |
boolean |
addAll(Collection coll)
|
void |
clear()
Removes all of the elements from this set. |
PoolableSetIF |
createSet()
INTERNAL: Returns a new empty poolable set. |
PoolableSetIF |
createSet(Set set)
INTERNAL: Returns a new poolable set that contains the given elements. |
PoolableSetIF |
createSetAdd(Set set,
Object o)
INTERNAL: Returns a new poolable set that contains the given elements plus the single object. |
PoolableSetIF |
createSetRemove(Set set,
Object o)
INTERNAL: Returns a new poolable set that contains the given elements minus the single object. |
void |
dereference(Set set)
INTERNAL: Decrement reference count for the given set. |
void |
dump()
INTERNAL: Used for debugging only. |
int |
hashCode()
|
protected Object |
lookup(Object o)
INTERNAL: Looks up the object in the hashset and returns the actual object stored at the hashset. |
Set |
reference(Set set)
INTERNAL: Get the internal representation of a given set. |
protected void |
registerSet(Set set)
|
boolean |
remove(Object o)
Removes the specified element from the set. |
Set |
remove(Set set,
Object o,
boolean dereference)
INTERNAL: Return a set that is the result of removing the given object from the given set. |
boolean |
removeAll(Collection coll)
|
boolean |
retainAll(Collection coll)
|
protected void |
unregisterSet(Set set)
|
| Methods inherited from class net.ontopia.utils.CompactHashSet |
|---|
contains, isEmpty, iterator, rehash, rehash, size, toArray, toArray |
| Methods inherited from class java.util.AbstractSet |
|---|
equals |
| Methods inherited from class java.util.AbstractCollection |
|---|
containsAll, toString |
| 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 PoolableSetFactoryIF factory
protected int hc
protected int hc_modCount
| Constructor Detail |
|---|
public SetPool()
public SetPool(PoolableSetFactoryIF factory)
public SetPool(int size)
public SetPool(int size,
PoolableSetFactoryIF factory)
public SetPool(Collection c)
public SetPool(Collection c,
PoolableSetFactoryIF factory)
| Method Detail |
|---|
public PoolableSetIF createSet()
PoolableSetFactoryIF
createSet in interface PoolableSetFactoryIFpublic PoolableSetIF createSet(Set set)
PoolableSetFactoryIF
createSet in interface PoolableSetFactoryIF
public PoolableSetIF createSetAdd(Set set,
Object o)
PoolableSetFactoryIF
createSetAdd in interface PoolableSetFactoryIF
public PoolableSetIF createSetRemove(Set set,
Object o)
PoolableSetFactoryIF
createSetRemove in interface PoolableSetFactoryIFprotected void registerSet(Set set)
protected void unregisterSet(Set set)
public Set reference(Set set)
reference in interface SetPoolIFpublic void dereference(Set set)
SetPoolIF
dereference in interface SetPoolIFprotected Object lookup(Object o)
public Set add(Set set,
Object o,
boolean dereference)
SetPoolIF
add in interface SetPoolIF
public Set remove(Set set,
Object o,
boolean dereference)
SetPoolIF
remove in interface SetPoolIFpublic void dump()
CompactHashSet
dump in class CompactHashSetpublic boolean add(Object o)
CompactHashSet
add in interface Collectionadd in interface Setadd in class CompactHashSeto - element to be added to this set.
public boolean remove(Object o)
CompactHashSet
remove in interface Collectionremove in interface Setremove in class CompactHashSetpublic boolean addAll(Collection coll)
addAll in interface CollectionaddAll in interface SetaddAll in class AbstractCollectionpublic boolean removeAll(Collection coll)
removeAll in interface CollectionremoveAll in interface SetremoveAll in class AbstractSetpublic boolean retainAll(Collection coll)
retainAll in interface CollectionretainAll in interface SetretainAll in class AbstractCollectionpublic void clear()
CompactHashSet
clear in interface Collectionclear in interface Setclear in class CompactHashSetpublic int hashCode()
hashCode in interface CollectionhashCode in interface SethashCode in class AbstractSet
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||