KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > infoglue > cms > util > sorters > DefaultInterceptionPointComparator


1 package org.infoglue.cms.util.sorters;
2
3 import java.util.Comparator JavaDoc;
4
5 import org.infoglue.cms.entities.management.InterceptionPointVO;
6
7
8 /**
9  * @author Mattias Bogeblad
10  *
11  */

12
13 public class DefaultInterceptionPointComparator implements Comparator JavaDoc
14 {
15
16     public int compare(Object JavaDoc o1, Object JavaDoc o2)
17     {
18         int result = 0;
19         InterceptionPointVO interceptionPointVO2 = (InterceptionPointVO)o2;
20         InterceptionPointVO interceptionPointVO1 = (InterceptionPointVO)o1;
21     
22         int orderColumnResult = interceptionPointVO1.getName().compareTo(interceptionPointVO2.getName());
23         
24         if(orderColumnResult != 0)
25             result = orderColumnResult;
26         
27         return result;
28     }
29
30 }
31
Popular Tags