|
deegree 2.1 (2007/11/08 09:57 build-328-official) | |||||||||
| 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
org.deegree.model.csct.resources.WeakHashSet
public class WeakHashSet
A set of object hold by weak references. This class is used to implements caches.
| Constructor Summary | |
|---|---|
WeakHashSet()
Construct a WeakHashSet. |
|
| Method Summary | |
|---|---|
boolean |
add(Object obj)
Adds the specified element to this set if it is not already present. |
void |
clear()
Removes all of the elements from this set. |
boolean |
contains(Object obj)
Returns true if this set contains the specified element. |
protected boolean |
equals(Object object1,
Object object2)
Check two objects for equality. |
Object |
get(Object obj)
Returns an object equals to the specified object, if present. |
protected int |
hashCode(Object object)
Returns a hash code value for the specified object. |
Object |
intern(Object object)
Returns an object equals to obj if such an object already
exist in this WeakHashSet. |
void |
intern(Object[] objects)
Iteratively call intern(Object) for an array of objects. |
Iterator |
iterator()
Returns an iterator over the elements contained in this collection. |
int |
size()
Returns the count of element in this set. |
Object[] |
toArray()
Returns a view of this set as an array. |
| Methods inherited from class java.util.AbstractSet |
|---|
equals, hashCode, removeAll |
| Methods inherited from class java.util.AbstractCollection |
|---|
addAll, containsAll, isEmpty, remove, retainAll, toArray, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Set |
|---|
addAll, containsAll, isEmpty, remove, retainAll, toArray |
| Constructor Detail |
|---|
public WeakHashSet()
WeakHashSet.
| Method Detail |
|---|
public boolean contains(Object obj)
true if this set contains the specified element.
contains in interface Collectioncontains in interface Setcontains in class AbstractCollectionobj - Object to be checked for containment in this set.
true if this set contains the specified element.public final Object get(Object obj)
obj,
then this method returns null.
public boolean add(Object obj)
false.
add in interface Collectionadd in interface Setadd in class AbstractCollectionobj - Element to be added to this set.
true if this set did not already
contain the specified element.public final Object intern(Object object)
obj if such an object already
exist in this WeakHashSet. Otherwise, add obj
to this WeakHashSet. This method is equivalents to the
following code:
if (object!=null)
{
final Object current=get(object);
if (current!=null) return current;
else add(object);
}
return object;
public final void intern(Object[] objects)
intern(Object) for an array of objects.
This method is equivalents to the following code:
for (int i=0; i
public final int size()
size in interface Collectionsize in interface Setsize in class AbstractCollectionpublic final void clear()
clear in interface Collectionclear in interface Setclear in class AbstractCollectionpublic final Object[] toArray()
toArray in interface CollectiontoArray in interface SettoArray in class AbstractCollectionpublic Iterator iterator()
iterator in interface Iterableiterator in interface Collectioniterator in interface Setiterator in class AbstractCollectionprotected int hashCode(Object object)
Object.hashCode().
Override to compute hash code in a different way.
protected boolean equals(Object object1,
Object object2)
hashCode(Object) has been overriden.
|
deegree 2.1 (2007/11/08 09:57 build-328-official) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://deegree.sourceforge.net