private void addNodeToList(List vmList,int startIndexForNode,int endIndexForNode){
  vmList.clear();
  for (int i=startIndexForNode; i < endIndexForNode; i++) {
    vmList.add(vm[i]);
  }
}

private void addNodeToList ( List vmList , int startIndexForNode , int endIndexForNode ) { vmList . clear ( ) ; for ( int i = startIndexForNode ; i < endIndexForNode ; i ++ ) { vmList . add ( vm [ i ] ) ; } }
this function adds nodes to node list in the range specified by startindexfornode and endindexfornode
