question: public MapNode nextStop ( ) { MapNode next = stops . get ( index ) ; if ( comingBack ) { index -- ; } else { index ++ ; } if ( index < 0 ) { comingBack = false ; index = 1 ; } if ( index >= stops . size ( ) ) { if ( type == PINGPONG ) { comingBack = true ; index = stops . size ( ) - 1 ; } else { index = 0 ; } } return next ; }
target:  Returns the next stop on the route (depending on the route mode)