org.apache.commons.collections.bag

Class AbstractBagDecorator

public abstract class AbstractBagDecorator extends AbstractCollectionDecorator implements Bag

Decorates another Bag to provide additional behaviour.

Methods are forwarded directly to the decorated bag.

Since: Commons Collections 3.0

Version: $Revision: 155406 $ $Date: 2005-02-26 12:55:26 +0000 (Sat, 26 Feb 2005) $

Author: Stephen Colebourne

Constructor Summary
protected AbstractBagDecorator()
Constructor only used in deserialization, do not use otherwise.
protected AbstractBagDecorator(Bag bag)
Constructor that wraps (not copies).
Method Summary
booleanadd(Object object, int count)
protected BaggetBag()
Gets the bag being decorated.
intgetCount(Object object)
booleanremove(Object object, int count)
SetuniqueSet()

Constructor Detail

AbstractBagDecorator

protected AbstractBagDecorator()
Constructor only used in deserialization, do not use otherwise.

Since: Commons Collections 3.1

AbstractBagDecorator

protected AbstractBagDecorator(Bag bag)
Constructor that wraps (not copies).

Parameters: bag the bag to decorate, must not be null

Throws: IllegalArgumentException if list is null

Method Detail

add

public boolean add(Object object, int count)

getBag

protected Bag getBag()
Gets the bag being decorated.

Returns: the decorated bag

getCount

public int getCount(Object object)

remove

public boolean remove(Object object, int count)

uniqueSet

public Set uniqueSet()
Copyright © 2001-2008 Apache Software Foundation. All Rights Reserved.