}
private ItineraryBean getPathAsItinerary(GraphPath path,
OBATraverseOptions options) {
ItineraryBean itinerary = new ItineraryBean();
State startState = path.states.getFirst();
State endState = path.states.getLast();
itinerary.setStartTime(startState.getTime());
itinerary.setEndTime(endState.getTime());
List<LegBean> legs = new ArrayList<LegBean>();
itinerary.setLegs(legs);
/**
* We set the current state index to 1, skipping the first state, since it
* has no back edge
*/