1 |
package dk.thoerup.side9; |
2 |
|
3 |
|
4 |
import java.util.Comparator; |
5 |
|
6 |
import android.graphics.Bitmap; |
7 |
|
8 |
public class ImageEntry { |
9 |
private static final long serialVersionUID = 1L; |
10 |
|
11 |
public String path; |
12 |
public Bitmap thumb; //do not serialize |
13 |
public String caption; |
14 |
|
15 |
|
16 |
public static class PathComparator implements Comparator<ImageEntry> { |
17 |
@Override |
18 |
public int compare(ImageEntry object1, ImageEntry object2) { |
19 |
return object1.path.compareTo(object2.path) * -1; |
20 |
} |
21 |
} |
22 |
|
23 |
public static class CaptionComparator implements Comparator<ImageEntry> { |
24 |
@Override |
25 |
public int compare(ImageEntry object1, ImageEntry object2) { |
26 |
return object1.caption.compareTo( object2.caption ); |
27 |
} |
28 |
|
29 |
} |
30 |
|
31 |
} |