]> gitweb.fperrin.net Git - GpsPrune.git/blobdiff - tim/prune/load/PhotoSorter.java
Version 7, February 2009
[GpsPrune.git] / tim / prune / load / PhotoSorter.java
index 7e65cacb1e28d432d85fe8d7e36280833fcdd66c..6da6f64828aa559a858dc83472fced11c4c23f80 100644 (file)
@@ -8,17 +8,17 @@ import tim.prune.data.Photo;
 /**
  * Class to sort photos by name
  */
-public class PhotoSorter implements Comparator
+public class PhotoSorter implements Comparator<Photo>
 {
 
        /**
         * Compare two photos
         * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
         */
-       public int compare(Object o1, Object o2)
+       public int compare(Photo o1, Photo o2)
        {
-               File file1 = ((Photo) o1).getFile();
-               File file2 = ((Photo) o2).getFile();
+               File file1 = o1.getFile();
+               File file2 = o2.getFile();
                int nameComp = file1.getName().compareTo(file2.getName());
                if (nameComp == 0)
                {