commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Colebourne" <scolebou...@btopenworld.com>
Subject Re: [collections] possible contribution, LowercaseComparator and NumberComparator
Date Sat, 12 Oct 2002 22:49:36 GMT
From: <EPugh@upstate.com>
> LowercaseComparator (which should be called IgnoreCaseComparator) allows
you
> to compare two strings, say "Eric" and "eric" and get back that they are
the
> same.  This is useful when you are sorting strings that are in multiple
> types of case, and you don't care about the case for sorting purposes.

Lowercase comparator would appear to be the same as
String.CASE_INSENSITIVE_ORDER. Any differences?

> NumberComparator works in a similar fashing.  When sorting (as strings)
"1",
> "5", and "10" you get back them in the order: "1","10","5" when you really
> want them back in the order 1,5,10.  So this comparator, if both sides are
> Strings that are numbers, does that for you.

This would appear to be similar to NumericStringComparator in [util] in the
sandbox.  Any differences?

Stephen


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


Mime
View raw message