question: protected void sortPartsOnView ( ) { viewPartPositions . clear ( ) ; List < PartPresenter > sortedParts = getSortedParts ( ) ; for ( PartPresenter partPresenter : sortedParts ) { viewPartPositions . add ( sortedParts . indexOf ( partPresenter ) , parts . indexOf ( partPresenter ) ) ; } view . setTabpositions ( viewPartPositions ) ; }
target:  Sort parts depending on constraint. 