Coverage Report - de.glossmaker.gloss.datastructure.GlossItemComparator
 
Classes in this File Line Coverage Branch Coverage Complexity
GlossItemComparator
100%
5/5
100%
2/2
2
 
 1  
 package de.glossmaker.gloss.datastructure;
 2  
 
 3  
 import java.util.Comparator;
 4  
 
 5  
 /**
 6  
  * 
 7  
  * @author Markus Flingelli
 8  
  *
 9  
  */
 10  49
 public class GlossItemComparator implements Comparator<GlossItem> {
 11  
 
 12  
         @Override
 13  
         public int compare(GlossItem item1, GlossItem item2) {
 14  25
                 int result = item1.getHeading().compareTo(item2.getHeading());
 15  25
                 if (result == 0) {
 16  10
                         result = item1.getWord().compareTo(item2.getWord());
 17  
                 }
 18  
                 
 19  25
                 return result;
 20  
         }
 21  
 
 22  
 }