Clover Coverage Report - Pebble 2.5-SNAPSHOT
Coverage timestamp: Sat Jun 12 2010 09:39:29 EST
../../../../img/srcFileCovDistChart10.png 0% of files have more coverage
5   29   1   5
0   11   0,2   1
1     1  
1    
This report was generated with an evaluation server license. Purchase Clover or configure your license.
 
  ReverseBlogEntryIdComparator       Line # 10 5 0% 1 0 100% 1.0
 
  (30)
 
1    package net.sourceforge.pebble.comparator;
2   
3    import java.util.Comparator;
4   
5    /**
6    * A comparator used to order blog entry id instances, in reverse order..
7    *
8    * @author Simon Brown
9    */
 
10    public class ReverseBlogEntryIdComparator implements Comparator {
11   
12    /**
13    * Compares two objects.
14    *
15    * @param o1 object 1
16    * @param o2 object 2
17    * @return -n, 0 or +n if the date represented by the second blog entry is less than,
18    * the same as or greater than the first, respectively
19    */
 
20  964 toggle public int compare(Object o1, Object o2) {
21  964 String blogEntryId1 = (String)o1;
22  964 String blogEntryId2 = (String)o2;
23  964 Long l1 = Long.parseLong(blogEntryId1);
24  964 Long l2 = Long.parseLong(blogEntryId2);
25   
26  964 return l2.compareTo(l1);
27    }
28   
29    }