net.jetrix.filter
Class FilenameComparator
java.lang.Object
net.jetrix.filter.FilenameComparator
- All Implemented Interfaces:
- Comparator<File>
public class FilenameComparator
- extends Object
- implements Comparator<File>
An improved lexicographic comparator handling a number in a name as a single
character. Unlike the lexicographic order where "foo1.txt" < "foo10.txt" < "foo2.txt"
here we have "foo1.txt" < "foo2.txt" < "foo10.txt".
todo: move this code to commons-io or commons-lang
- Since:
- 0.3
- Version:
- $Revision: 794 $, $Date: 2009-02-17 20:08:39 +0100 (Tue, 17 Feb 2009) $
- Author:
- Emmanuel Bourg
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FilenameComparator
public FilenameComparator()
compare
public int compare(File file1,
File file2)
- Specified by:
compare in interface Comparator<File>
Copyright © 2001-2010. All Rights Reserved.