# HG changeset patch # User hertzhaft # Date 1144843957 -7200 # Node ID 6f841a0f859238712f8fce73c4eb586246b3f32b # Parent 714b75b7782999304c57859cd213a067730016ff modified DocuDirent.compareTo instead of ImageFileset.compareTo diff -r 714b75b77829 -r 6f841a0f8592 servlet/src/digilib/io/DocuDirent.java --- a/servlet/src/digilib/io/DocuDirent.java Wed Apr 12 14:12:37 2006 +0200 +++ b/servlet/src/digilib/io/DocuDirent.java Wed Apr 12 14:12:37 2006 +0200 @@ -150,11 +150,16 @@ } /** Comparator using the file name. + * Compares to a String (for binarySearch) + * or to another DocuDirent (for sort) * * @see java.lang.Comparable#compareTo(java.lang.Object) */ public int compareTo(Object arg0) { - return (getName().compareTo((String) arg0)); + return (arg0 instanceof DocuDirent) + ? getName().compareTo(((DocuDirent) arg0).getName()) + : getName().compareTo((String) arg0); } + } diff -r 714b75b77829 -r 6f841a0f8592 servlet/src/digilib/io/ImageFileset.java --- a/servlet/src/digilib/io/ImageFileset.java Wed Apr 12 14:12:37 2006 +0200 +++ b/servlet/src/digilib/io/ImageFileset.java Wed Apr 12 14:12:37 2006 +0200 @@ -109,16 +109,6 @@ } /** - * Compares to a String (for binarySearch) - * or to another ImageFileset (for sort) - */ - public int compareTo(Object arg0) { - return (arg0 instanceof ImageFileset) - ? getName().compareTo(((ImageFileset) arg0).getName()) - : getName().compareTo((String) arg0); - } - - /** * Get the ImageFile at the index. * *