public void closeNewList ( ) throws IOException { if ( ! closed ) { if ( segmentRegistration != null ) { this . segmentName = null ; } if ( newSize > 0 ) { // add remaining old while ( position < getSize ( ) ) { if ( newPosition == newSize ) { increaseNewListSize ( ) ; } newKeyList [ newPosition ] = keyList [ position ] ; newSourceNumberList [ newPosition ] = sourceNumberList [ position ] ; newErrorNumber [ newPosition ] = errorNumber [ position ] ; newErrorList [ newPosition ] = errorList [ position ] ; if ( hasSub ) { newSubCollectorListNextLevel [ newPosition ] = subCollectorListNextLevel [ position ] ; } copyToNew ( position , newPosition ) ; position ++ ; newPosition ++ ; } // copy keyList = newKeyList ; sourceNumberList = newSourceNumberList ; errorNumber = newErrorNumber ; errorList = newErrorList ; subCollectorListNextLevel = newSubCollectorListNextLevel ; copyFromNew ( ) ; size = newPosition ; // sort and merge if ( ! sortedAndUnique ( keyList , getSize ( ) ) ) { remapData ( computeSortAndUniqueMapping ( keyList , getSize ( ) ) ) ; } } position = 0 ; newSize = 0 ; newPosition = 0 ; newCurrentPosition = 0 ; } }
Close new list .