public static int compare(String id1,String id2){
  int result=-1;
  String seed1=IdGenerator.getSeedFromId(id1);
  String seed2=IdGenerator.getSeedFromId(id2);
  if (seed1 != null && seed2 != null) {
    result=seed1.compareTo(seed2);
    if (result == 0) {
      long count1=IdGenerator.getSequenceFromId(id1);
      long count2=IdGenerator.getSequenceFromId(id2);
      result=(int)(count1 - count2);
    }
  }
  return result;
}

public static int compare ( String id1 , String id2 ) { int result = - 1 ; String seed1 = IdGenerator . getSeedFromId ( id1 ) ; String seed2 = IdGenerator . getSeedFromId ( id2 ) ; if ( seed1 != null && seed2 != null ) { result = seed1 . compareTo ( seed2 ) ; if ( result == 0 ) { long count1 = IdGenerator . getSequenceFromId ( id1 ) ; long count2 = IdGenerator . getSequenceFromId ( id2 ) ; result = ( int ) ( count1 - count2 ) ; } } return result ; }
does a proper compare on the id ' s
