org.apache.commons.collections.bag
Class AbstractBagDecorator
- Bag, Collection
public abstract class AbstractBagDecorator
Decorates another
Bag to provide additional behaviour.
Methods are forwarded directly to the decorated bag.
$Revision: 155406 $ $Date: 2005-02-26 12:55:26 +0000 (Sat, 26 Feb 2005) $
add, addAll, clear, contains, containsAll, equals, getCollection, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray, toString |
AbstractBagDecorator
protected AbstractBagDecorator()
Constructor only used in deserialization, do not use otherwise.
AbstractBagDecorator
protected AbstractBagDecorator(Bag bag)
Constructor that wraps (not copies).
bag - the bag to decorate, must not be null
add
public boolean add(Object object,
int count)- add in interface Bag
getBag
protected Bag getBag()
Gets the bag being decorated.
getCount
public int getCount(Object object)
- getCount in interface Bag
remove
public boolean remove(Object object,
int count)- remove in interface Bag
Copyright © 2001-2015 Apache Software Foundation. All Rights Reserved.