View Javadoc

1   package net.sf.imca.model;
2   
3   import java.util.Comparator;
4   import java.util.Locale;
5   
6   
7   public class AssociationComparator implements Comparator<AssociationBO> {
8   
9       public int compare(AssociationBO a1, AssociationBO a2) {
10          
11          
12          String s1 = a1.getEntity().getIsoCountryCode();
13          String s2 = a2.getEntity().getIsoCountryCode();
14          
15          Locale l1 = new Locale("en", s1);
16          Locale l2 = new Locale("en", s2);
17          
18          return l1.getISO3Country().compareTo(l2.getISO3Country());
19      }
20  
21  }