org.apache.commons.collections
public class TreeBag extends DefaultMapBag implements SortedBag
Deprecated: Moved to bag subpackage and rewritten internally. Due to be removed in v4.0.
A Bag that is backed by a TreeMap. Order will be maintained among the unique representative members.Since: Commons Collections 2.0
Version: $Revision: 646777 $ $Date: 2008-04-10 13:33:15 +0100 (Thu, 10 Apr 2008) $
| Constructor Summary | |
|---|---|
| TreeBag()
Constructs an empty TreeBag. | |
| TreeBag(Comparator comparator)
Constructs an empty Bag that maintains order on its unique
representative members according to the given Comparator.
| |
| TreeBag(Collection coll)
Constructs a Bag containing all the members of the given
collection.
| |
| Method Summary | |
|---|---|
| Comparator | comparator() |
| Object | first() |
| Object | last() |
TreeBag.Parameters: comparator the comparator to use
Parameters: coll the collection to copy into the bag