3 |
|
/** |
4 |
|
* Mixin interface used by collections, maps, and similar objects to |
5 |
|
* indicate that their elements or mappings are stored in sorted |
6 |
< |
* order. |
6 |
> |
* order. This allows consumers of collections to determine if the collection |
7 |
> |
* is sorted, and if so, retrieve the sort comparator. |
8 |
> |
* @since 1.5 |
9 |
> |
* @author Josh Bloch |
10 |
|
*/ |
11 |
|
|
12 |
|
public interface Sorted { |
13 |
|
/** |
14 |
|
* Returns the comparator used to order this collection, or <tt>null</tt> |
15 |
< |
* if this collection is sorted according to its elements natural ordering. |
15 |
> |
* if this collection is sorted according to its elements natural ordering |
16 |
> |
* (using <tt>Comparable</tt>.) |
17 |
|
* |
18 |
|
* @return the comparator used to order this collection, or <tt>null</tt> |
19 |
|
* if this collection is sorted according to its elements natural ordering. |