1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package net.sf.webphotos.entity;
17
18 import java.util.Comparator;
19
20
21
22
23
24 public interface IsPhoto extends Comparable<IsPhoto> {
25
26 public String getKey();
27
28 public IsCredits getCreditos();
29
30 public String getLegenda();
31
32 public static final Comparator<IsPhoto> BY_KEY_ASCENDING = new Comparator<IsPhoto>() {
33
34 @Override
35 public int compare(IsPhoto photoOne, IsPhoto photoTwo) {
36 return photoOne.getKey().compareTo(photoTwo.getKey());
37 }
38
39 };
40
41 public static final Comparator<IsPhoto> BY_KEY_DESCENDING = new Comparator<IsPhoto>() {
42
43 @Override
44 public int compare(IsPhoto photoOne, IsPhoto photoTwo) {
45 return photoTwo.getKey().compareTo(photoOne.getKey());
46 }
47
48 };
49
50 }