org.eml.sir.util
Class FileNameComparator

java.lang.Object
  extended byorg.eml.sir.util.FileNameComparator
All Implemented Interfaces:
java.util.Comparator

public class FileNameComparator
extends java.lang.Object
implements java.util.Comparator

Compares file names by the digits.

Author:
Hendrik Niederlich (EML-R)

Constructor Summary
FileNameComparator()
           
 
Method Summary
 int compare(java.lang.Object o1, java.lang.Object o2)
          Interpret two objects as String representation of integer values, ignoring any character but digits and compare the corresponding integer values.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

FileNameComparator

public FileNameComparator()
Method Detail

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
Interpret two objects as String representation of integer values, ignoring any character but digits and compare the corresponding integer values. Will be < 0, if int(o1) < int(o2).

Specified by:
compare in interface java.util.Comparator