⇒ Index (Frames) |  ⇒ Index (No Frames) |  ⇒ Package |  ⇒ Package Tree |  ⇒ Full Tree 
org.apache.commons.collections.bag

Class AbstractSortedBagDecorator

java.lang.Object
|
+--org.apache.commons.collections.collection.AbstractCollectionDecorator
   |
   +--org.apache.commons.collections.bag.AbstractBagDecorator
      |
      +--org.apache.commons.collections.bag.AbstractSortedBagDecorator

All Implemented Interfaces:
Collection, Bag, SortedBag

Known Direct Subclasses:
UnmodifiableSortedBag


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
Author:
Stephen Colebourne

Constructor Summary

AbstractSortedBagDecorator(SortedBag bag)

Constructor that wraps (not copies).

Method Summary

Comparator

comparator()

Object

first()

SortedBag

getSortedBag()

Gets the bag being decorated.

Object

last()

Constructor Details

AbstractSortedBagDecorator

protected AbstractSortedBagDecorator(SortedBag bag)

Constructor that wraps (not copies).

Parameters:
bag - the bag to decorate, must not be null
Throws:
- if list is null

Method Details

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()