1 25 26 package org.objectweb.jonas.webapp.jonasadmin.common; 27 28 import java.util.Comparator ; 29 30 import org.objectweb.jonas.webapp.taglib.LabelValueBean; 31 32 33 36 public class LabelValueByLabelComparator implements Comparator { 37 38 40 public int compare(Object p_O1, Object p_O2) { 41 LabelValueBean o1 = (LabelValueBean) p_O1; 42 LabelValueBean o2 = (LabelValueBean) p_O2; 43 return o1.getLabel().compareToIgnoreCase(o2.getLabel()); 44 } 45 46 public boolean equals(Object p_Obj) { 47 if (p_Obj instanceof LabelValueBean) { 48 return (compare(this, p_Obj) == 0); 49 } 50 return false; 51 } 52 } | Popular Tags |