On Wed, 23 Oct 2002, Ola Berg wrote:

> The isSorted() method answers questions about the ordering of elements
> in a sequentially ordered collection. But the ordering can vary,
> that's why you can sort using different comparators. Therefore I
> propose
>
> isSorted( Comparator). The method isSorted() checks according to the
> default ordering, and isSorted( Comparator) uses the provided
> ordering. A good idea?

Yep. And (for once) I get to claim I'd already got that :)

The actual API is:

int sortDirection(List)
int sortDirection(List, Comparator)
boolean isSorted(List)
boolean isSorted(List, Comparator)

I think it was Stephen who in an earlier thread [few weeks back] wanted to
see only the one meth-type:

int getSorted(List)
int getSorted(List, Comparator)

which returned UNSORTED, SORTED_ASCENDING, SORTED_DESCENDING. I think.

Hen


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@;jakarta.apache.org>

Reply via email to