posted 19 years ago
Consider simply creating a Comparator that knows about your particular file format.You can use this comparator to build a TreeSet or to call Collections.sort(List, Comparator). The disadvantage of this approach is that you're parsing the filenames more often than strictly necessary - O(n log n) rather than O(n) - but in most cases that shouldn't be a problem.
- Peter
[ June 08, 2004: Message edited by: Peter den Haan ]
Peter den Haan | peterdenhaan.com | quantum computing specialist, Objectivity Ltd