return bean;
}
public ItineraryV2Bean getItinerary(ItineraryBean itinerary) {
ItineraryV2Bean bean = new ItineraryV2Bean();
bean.setStartTime(itinerary.getStartTime());
bean.setEndTime(itinerary.getEndTime());
bean.setProbability(itinerary.getProbability());
bean.setSelected(itinerary.isSelected());
List<LegBean> legs = itinerary.getLegs();
if (!CollectionsLibrary.isEmpty(legs)) {
List<LegV2Bean> legBeans = new ArrayList<LegV2Bean>(legs.size());
for (LegBean leg : legs) {
LegV2Bean legBean = getLeg(leg);
legBeans.add(legBean);
}
bean.setLegs(legBeans);
}
return bean;
}