private void swapINodes ( List < INode > listOfNodes , int source , int target ) { INode aux = listOfNodes . get ( source ) ; listOfNodes . set ( source , listOfNodes . get ( target ) ) ; listOfNodes . set ( target , aux ) ; }
Swaps the INodes in listOfNodes in the positions source and target .