private static void adjustMappingPairVector(int col,int incr,Vector<MappingPair> vec){
  int i;
  for (i=0; (i < vec.size()) && (vec.elementAt(i).col < col); i++) {
  }
  if (i == vec.size()) {
    vec.add(new MappingPair(col,incr));
  }
 else   if (vec.elementAt(i).col == col) {
    vec.elementAt(i).inc=vec.elementAt(i).inc + incr;
  }
 else {
    vec.insertElementAt(new MappingPair(col,incr),i);
  }
}

private static void adjustMappingPairVector ( int col , int incr , Vector < MappingPair > vec ) { int i ; for ( i = 0 ; ( i < vec . size ( ) ) && ( vec . elementAt ( i ) . col < col ) ; i ++ ) { } if ( i == vec . size ( ) ) { vec . add ( new MappingPair ( col , incr ) ) ; } else if ( vec . elementAt ( i ) . col == col ) { vec . elementAt ( i ) . inc = vec . elementAt ( i ) . inc + incr ; } else { vec . insertElementAt ( new MappingPair ( col , incr ) , i ) ; } }
modify vec so the line mapping nl it represents is related to the original line mapping ol by nl [ c ] = if c < col then ol [ c ] else ol [ c ] + incr
