public int compareTo(Object o){
  Split split=(Split)o;
  BitSet P=getFirstPart();
  BitSet Q=split.getFirstPart();
  int a=P.nextSetBit(0);
  int b=Q.nextSetBit(0);
  while (a > -1 && b > -1) {
    if (a < b)     return -1;
 else     if (a > b)     return 1;
    a=P.nextSetBit(a + 1);
    b=Q.nextSetBit(b + 1);
  }
  if (a < b)   return -1;
 else   if (a > b)   return 1;
  P=getSecondPart();
  Q=split.getSecondPart();
  a=P.nextSetBit(0);
  b=Q.nextSetBit(0);
  while (a > -1 && b > -1) {
    if (a < b)     return -1;
 else     if (a > b)     return 1;
    a=P.nextSetBit(a + 1);
    b=Q.nextSetBit(b + 1);
  }
  if (a < b)   return -1;
 else   if (a > b)   return 1;
 else   return 0;
}

public int compareTo ( Object o ) { Split split = ( Split ) o ; BitSet P = getFirstPart ( ) ; BitSet Q = split . getFirstPart ( ) ; int a = P . nextSetBit ( 0 ) ; int b = Q . nextSetBit ( 0 ) ; while ( a > - 1 && b > - 1 ) { if ( a < b ) return - 1 ; else if ( a > b ) return 1 ; a = P . nextSetBit ( a + 1 ) ; b = Q . nextSetBit ( b + 1 ) ; } if ( a < b ) return - 1 ; else if ( a > b ) return 1 ; P = getSecondPart ( ) ; Q = split . getSecondPart ( ) ; a = P . nextSetBit ( 0 ) ; b = Q . nextSetBit ( 0 ) ; while ( a > - 1 && b > - 1 ) { if ( a < b ) return - 1 ; else if ( a > b ) return 1 ; a = P . nextSetBit ( a + 1 ) ; b = Q . nextSetBit ( b + 1 ) ; } if ( a < b ) return - 1 ; else if ( a > b ) return 1 ; else return 0 ; }
compare to a split object
