|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.limegroup.gnutella.util.FileComparator
Compares to File's lexically by file name). Useful for storing Java 1.1.8 Files in Java 1.2+ sorted collections classes. This is needed because Files in 1.1.8 do not implement the Comparable interface, unlike Strings in 1.2+.
| Constructor Summary | |
FileComparator()
|
|
| Method Summary | |
int |
compare(java.lang.Object a,
java.lang.Object b)
Returns (((File)a).getAbsolutePath()).compareTo( ((File)b).getAbsolutePath()) Typically you'll want to make sure a and b are canonical files, but that isn't strictly necessary. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Comparator |
equals |
| Constructor Detail |
public FileComparator()
| Method Detail |
public int compare(java.lang.Object a,
java.lang.Object b)
compare in interface java.util.Comparator
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||