Constructor and Description |
---|
WeakBag()
Initializes a new weak bag.
|
Modifier and Type | Method and Description |
---|---|
void |
add(T t)
Adds an element to the bag.
|
void |
clean()
Removes any null objects from the bag.
|
void |
clear()
Removes all object from the bag.
|
boolean |
contains(T t) |
List<T> |
getAll() |
Iterator<T> |
iterator() |
boolean |
remove(T t) |
int |
size()
Returns the size of the bag.
|
public void add(T t)
t
- Element to addpublic boolean remove(T t)
public boolean contains(T t)
public int size()
public void clear()
public void clean()