public void next(){
  index++;
}

public void next ( ) { index ++ ; }
moves the iterator to the next segment of the path forwards along the primary direction of traversal as long as there are more points in that direction .
