public interface

SortedBag

implements Bag
org.apache.commons.collections.SortedBag
Known Indirect Subclasses

Class Overview

Defines a type of Bag that maintains a sorted order among its unique representative members.

Summary

Public Methods
abstract Comparator comparator()
Returns the comparator associated with this sorted set, or null if it uses its elements' natural ordering.
abstract Object first()
Returns the first (lowest) member.
abstract Object last()
Returns the last (highest) member.
[Expand]
Inherited Methods
From interface java.lang.Iterable
From interface java.util.Collection
From interface org.apache.commons.collections.Bag

Public Methods

public abstract Comparator comparator ()

Returns the comparator associated with this sorted set, or null if it uses its elements' natural ordering.

Returns
  • the comparator in use, or null if natural ordering

public abstract Object first ()

Returns the first (lowest) member.

Returns
  • the first element in the sorted bag

public abstract Object last ()

Returns the last (highest) member.

Returns
  • the last element in the sorted bag