public void addLineData(int inputStartLine,String inputFileName,int inputLineCount,int outputStartLine,int outputLineIncrement){
  int fileIndex=filePathList.indexOf(inputFileName);
  if (fileIndex == -1)   throw new IllegalArgumentException("inputFileName: " + inputFileName);
  if (outputStartLine == 0)   return;
  LineInfo li=new LineInfo();
  li.setInputStartLine(inputStartLine);
  li.setInputLineCount(inputLineCount);
  li.setOutputStartLine(outputStartLine);
  li.setOutputLineIncrement(outputLineIncrement);
  if (fileIndex != lastFileID)   li.setLineFileID(fileIndex);
  lastFileID=fileIndex;
  lineData.add(li);
}

public void addLineData ( int inputStartLine , String inputFileName , int inputLineCount , int outputStartLine , int outputLineIncrement ) { int fileIndex = filePathList . indexOf ( inputFileName ) ; if ( fileIndex == - 1 ) throw new IllegalArgumentException ( "inputFileName: " + inputFileName ) ; if ( outputStartLine == 0 ) return ; LineInfo li = new LineInfo ( ) ; li . setInputStartLine ( inputStartLine ) ; li . setInputLineCount ( inputLineCount ) ; li . setOutputStartLine ( outputStartLine ) ; li . setOutputLineIncrement ( outputLineIncrement ) ; if ( fileIndex != lastFileID ) li . setLineFileID ( fileIndex ) ; lastFileID = fileIndex ; lineData . add ( li ) ; }
adds complete information about a simple line mapping . specify all the fields in this method ; the back - end machinery takes care of printing only those that are necessary in the final smap . ( my view is that fields are optional primarily for spatial efficiency , not for programmer convenience . could always add utility methods later . )
