View Javadoc

1   package net.sf.statsvn.util;
2   
3   import java.io.Serializable;
4   import java.util.Comparator;
5   
6   public class FilenameComparator implements Comparator, Serializable {
7   	private static final long serialVersionUID = 3456265631104179922L;
8   
9   	public int compare(final Object arg0, final Object arg1) {
10  		if (arg0 == null || arg1 == null) {
11  			return 0;
12  		}
13  
14  		final String s0 = arg0.toString().replace('/', '\t');
15  		final String s1 = arg1.toString().replace('/', '\t');
16  
17  		return s0.compareTo(s1);
18  	}
19  }