public class WeakList<T> extends UnsafeWeakList<T>
Collection
interface which:
WeakReference
)#add(T)
and iterator()
.myList
Constructor and Description |
---|
WeakList() |
WeakList(int initialCapacity) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(T element) |
boolean |
addAll(java.util.Collection<? extends T> c) |
boolean |
addIfAbsent(T element) |
void |
clear() |
boolean |
contains(java.lang.Object o) |
java.util.List<T> |
copyAndClear() |
boolean |
isEmpty() |
java.util.Iterator<T> |
iterator() |
boolean |
remove(java.lang.Object o) |
boolean |
removeAll(java.util.Collection<?> c) |
java.util.List<T> |
toStrongList() |
get, size
containsAll, retainAll, toArray, toArray, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public boolean add(T element)
add
in interface java.util.Collection<T>
add
in class UnsafeWeakList<T>
public boolean addAll(java.util.Collection<? extends T> c)
addAll
in interface java.util.Collection<T>
addAll
in class UnsafeWeakList<T>
public boolean addIfAbsent(T element)
addIfAbsent
in class UnsafeWeakList<T>
public void clear()
clear
in interface java.util.Collection<T>
clear
in class UnsafeWeakList<T>
public boolean contains(java.lang.Object o)
public boolean remove(java.lang.Object o)
remove
in interface java.util.Collection<T>
remove
in class UnsafeWeakList<T>
public boolean removeAll(java.util.Collection<?> c)
removeAll
in interface java.util.Collection<T>
removeAll
in class UnsafeWeakList<T>
public boolean isEmpty()
isEmpty
in interface java.util.Collection<T>
isEmpty
in class UnsafeWeakList<T>
public java.util.Iterator<T> iterator()
iterator
in interface java.lang.Iterable<T>
iterator
in interface java.util.Collection<T>
iterator
in class UnsafeWeakList<T>
public java.util.List<T> toStrongList()
toStrongList
in class UnsafeWeakList<T>
public java.util.List<T> copyAndClear()