public List<List<Integer>> toFinalList(){
  final List<List<Integer>> alignment=new ArrayList<>(trgPoints.size());
  if (trgPoints.isEmpty()) {
    return alignment;
  }
  final ListIterator<AlignedSourceTokens> it=trgPoints.listIterator();
  it.next();
  while (it.hasNext()) {
    final AlignedSourceTokens alignedSourceTokens=it.next();
    if (it.hasNext()) {
      final List<Integer> newAlignedSourceTokens=new ArrayList<>();
      for (      Integer sourceIndex : alignedSourceTokens) {
        newAlignedSourceTokens.add(sourceIndex - 1);
      }
      alignment.add(newAlignedSourceTokens);
    }
  }
  return alignment;
}

public List < List < Integer > > toFinalList ( ) { final List < List < Integer > > alignment = new ArrayList < > ( trgPoints . size ( ) ) ; if ( trgPoints . isEmpty ( ) ) { return alignment ; } final ListIterator < AlignedSourceTokens > it = trgPoints . listIterator ( ) ; it . next ( ) ; while ( it . hasNext ( ) ) { final AlignedSourceTokens alignedSourceTokens = it . next ( ) ; if ( it . hasNext ( ) ) { final List < Integer > newAlignedSourceTokens = new ArrayList < > ( ) ; for ( Integer sourceIndex : alignedSourceTokens ) { newAlignedSourceTokens . add ( sourceIndex - 1 ) ; } alignment . add ( newAlignedSourceTokens ) ; } } return alignment ; }
builds the final alignment list . each entry in the list corresponds to a list of aligned source tokens . first and last item in trgpoints is skipped .
