public int compare(Object o1,Object o2){
  String s1=(String)o1;
  String s2=(String)o2;
  if (s1.contains(Constants.COLON) && s2.contains(Constants.COLON)) {
    int s1v=Integer.parseInt(s1.substring(0,s1.indexOf(Constants.COLON)));
    int s2v=Integer.parseInt(s2.substring(0,s2.indexOf(Constants.COLON)));
    if (s1v < s2v) {
      return 1;
    }
 else {
      return -1;
    }
  }
 else   if (s1.contains(Constants.COLON)) {
    return 1;
  }
 else   if (s2.contains(Constants.COLON)) {
    return -1;
  }
  return -1;
}

public int compare ( Object o1 , Object o2 ) { String s1 = ( String ) o1 ; String s2 = ( String ) o2 ; if ( s1 . contains ( Constants . COLON ) && s2 . contains ( Constants . COLON ) ) { int s1v = Integer . parseInt ( s1 . substring ( 0 , s1 . indexOf ( Constants . COLON ) ) ) ; int s2v = Integer . parseInt ( s2 . substring ( 0 , s2 . indexOf ( Constants . COLON ) ) ) ; if ( s1v < s2v ) { return 1 ; } else { return - 1 ; } } else if ( s1 . contains ( Constants . COLON ) ) { return 1 ; } else if ( s2 . contains ( Constants . COLON ) ) { return - 1 ; } return - 1 ; }
compares two strings from the log headers . names should either be in the form # # : headername or headername , where # # is a two digit number . instances with # # : preceding will go first , in ascending order according to the two digit number . if two of the same number appear they will be ordered according to the order of in which they were compared .
