1 30 package com.genimen.djeneric.util; 31 32 import java.util.Comparator ; 33 34 import com.genimen.djeneric.repository.DjExtent; 35 36 public class DjExtentComparator implements Comparator 37 { 38 39 boolean _sortQualified = false; 40 41 public DjExtentComparator() 42 { 43 } 44 45 public DjExtentComparator(boolean sortQualified) 46 { 47 _sortQualified = sortQualified; 48 } 49 50 59 public int compare(Object o1, Object o2) 60 { 61 DjExtent f1 = (DjExtent) o1; 62 DjExtent f2 = (DjExtent) o2; 63 64 if (_sortQualified) return f1.getQualifiedObjectType().compareTo(f2.getQualifiedObjectType()); 65 return f1.getObjectType().compareTo(f2.getObjectType()); 66 } 67 68 } | Popular Tags |