org.apache.commons.collections.bag

Class AbstractSortedBagDecorator

public abstract class AbstractSortedBagDecorator extends AbstractBagDecorator implements SortedBag

Decorates another SortedBag 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 AbstractSortedBagDecorator()
Constructor only used in deserialization, do not use otherwise.
protected AbstractSortedBagDecorator(SortedBag bag)
Constructor that wraps (not copies).
Method Summary
Comparatorcomparator()
Objectfirst()
protected SortedBaggetSortedBag()
Gets the bag being decorated.
Objectlast()

Constructor Detail

AbstractSortedBagDecorator

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

Since: Commons Collections 3.1

AbstractSortedBagDecorator

protected AbstractSortedBagDecorator(SortedBag bag)
Constructor that wraps (not copies).

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

Throws: IllegalArgumentException if list is null

Method Detail

comparator

public Comparator comparator()

first

public Object first()

getSortedBag

protected SortedBag getSortedBag()
Gets the bag being decorated.

Returns: the decorated bag

last

public Object last()
Copyright © 2001-2008 Apache Software Foundation. All Rights Reserved.