I want the files to be ordered by their abs path name, but I want the lowercase to be sorted before the uppercase. Example: Let\'s say I got 4 files:
files2.
As suggested by others, Collator does what you want. Writing one of those collator rules looked a bit scary, but it looks like the standard English Collator does exactly what you want:
public static void main(String... args)
{
List items = Arrays.asList("b", "A", "a", "B");
Collections.sort(items, Collator.getInstance(Locale.ENGLISH));
System.out.println(items);
}
gives:
[a, A, b, B]