public int compare(Object o1,Object o2){
  String s1=o1.toString();
  if (s1 == null)   s1="";
  String s2=o2.toString();
  if (s2 == null)   s2="";
  return s1.compareTo(s2);
}

public int compare ( Object o1 , Object o2 ) { String s1 = o1 . toString ( ) ; if ( s1 == null ) s1 = "" ; String s2 = o2 . toString ( ) ; if ( s2 == null ) s2 = "" ; return s1 . compareTo ( s2 ) ; }
compare based on name
