java.lang.Object | +--org.apache.commons.collections.collection.AbstractCollectionDecorator | +--org.apache.commons.collections.bag.AbstractBagDecorator | +--org.apache.commons.collections.bag.UnmodifiableBagAll Implemented Interfaces:
boolean | add(Object object) |
boolean | add(Object object, int count) |
boolean | addAll(Collection coll) |
void | clear() |
static Bag | Factory method to create an unmodifiable bag. |
Iterator | iterator() |
boolean | remove(Object object) |
boolean | remove(Object object, int count) |
boolean | removeAll(Collection coll) |
boolean | retainAll(Collection coll) |
Set |
public boolean add(Object object, int count)
public boolean add(Object object)
public boolean addAll(Collection coll)
public void clear()
public static Bag decorate(Bag bag)
- if bag is nullpublic Iterator iterator()
public boolean remove(Object object, int count)
public boolean remove(Object object)
public boolean removeAll(Collection coll)
public boolean retainAll(Collection coll)
public Set uniqueSet()
Bag
to ensure it can't be altered.