Mercurial > hg > LGServices
comparison src/main/java/de/mpiwg/web/branch/SortBranchByLabel.java @ 33:5520f941f6cb
new: sorting and filters in homepage for branch list
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Fri, 25 Sep 2015 14:32:47 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
32:74fe1518bc5c | 33:5520f941f6cb |
---|---|
1 package de.mpiwg.web.branch; | |
2 | |
3 import java.util.Comparator; | |
4 | |
5 import de.mpiwg.gazetteer.bo.LGBranch; | |
6 import de.mpiwg.gazetteer.db.DBBook; | |
7 | |
8 | |
9 public class SortBranchByLabel implements Comparator<LGBranch>{ | |
10 | |
11 public int compare(LGBranch o1, LGBranch o2) { | |
12 if(o1 == null || o2 == null){ | |
13 return o1.getId().compareTo(o2.getId()); | |
14 } | |
15 return o1.getLabel().compareTo(o2.getLabel()); | |
16 } | |
17 | |
18 } |