public class ReferenceHashSet
extends java.lang.Object
implements java.util.Set, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static int |
HARD
Hard reference marker.
|
static int |
SOFT
Soft reference marker.
|
static int |
WEAK
Weak reference marker.
|
Constructor and Description |
---|
ReferenceHashSet(int refType)
Construct a set with the given reference type.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(java.lang.Object obj) |
boolean |
addAll(java.util.Collection coll) |
void |
clear() |
boolean |
contains(java.lang.Object obj) |
boolean |
containsAll(java.util.Collection coll) |
boolean |
equals(java.lang.Object obj) |
int |
hashCode() |
boolean |
isEmpty() |
java.util.Iterator |
iterator() |
boolean |
remove(java.lang.Object obj) |
boolean |
removeAll(java.util.Collection coll) |
boolean |
retainAll(java.util.Collection coll) |
int |
size() |
java.lang.Object[] |
toArray() |
java.lang.Object[] |
toArray(java.lang.Object[] arr) |
public static final int HARD
public static final int SOFT
public static final int WEAK
public ReferenceHashSet(int refType)
public boolean add(java.lang.Object obj)
add
in interface java.util.Collection
add
in interface java.util.Set
public boolean addAll(java.util.Collection coll)
addAll
in interface java.util.Collection
addAll
in interface java.util.Set
public void clear()
clear
in interface java.util.Collection
clear
in interface java.util.Set
public boolean contains(java.lang.Object obj)
contains
in interface java.util.Collection
contains
in interface java.util.Set
public boolean containsAll(java.util.Collection coll)
containsAll
in interface java.util.Collection
containsAll
in interface java.util.Set
public boolean isEmpty()
isEmpty
in interface java.util.Collection
isEmpty
in interface java.util.Set
public java.util.Iterator iterator()
iterator
in interface java.lang.Iterable
iterator
in interface java.util.Collection
iterator
in interface java.util.Set
public boolean remove(java.lang.Object obj)
remove
in interface java.util.Collection
remove
in interface java.util.Set
public boolean removeAll(java.util.Collection coll)
removeAll
in interface java.util.Collection
removeAll
in interface java.util.Set
public boolean retainAll(java.util.Collection coll)
retainAll
in interface java.util.Collection
retainAll
in interface java.util.Set
public int size()
size
in interface java.util.Collection
size
in interface java.util.Set
public java.lang.Object[] toArray()
toArray
in interface java.util.Collection
toArray
in interface java.util.Set
public java.lang.Object[] toArray(java.lang.Object[] arr)
toArray
in interface java.util.Collection
toArray
in interface java.util.Set
public int hashCode()
hashCode
in interface java.util.Collection
hashCode
in interface java.util.Set
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in interface java.util.Collection
equals
in interface java.util.Set
equals
in class java.lang.Object