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
4   28   1   4
0   10   0,25   1
1     1  
1    
This report was generated with an evaluation server license. Purchase Clover or configure your license.
 
  ReverseResponseIdComparator       Line # 10 4 0% 1 0 100% 1.0
 
  (8)
 
1    package net.sourceforge.pebble.comparator;
2   
3    import java.util.Comparator;
4   
5    /**
6    * A comparator used to order response ids, in reverse order.
7    *
8    * @author Simon Brown
9    */
 
10    public class ReverseResponseIdComparator 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  1398 toggle public int compare(Object o1, Object o2) {
21  1398 String responseId1 = (String)o1;
22  1398 String responseId2 = (String)o2;
23   
24  1398 int start = responseId1.lastIndexOf("/");
25  1398 return responseId2.substring(start).compareTo(responseId1.substring(start));
26    }
27   
28    }