_factory = factory;
}
public ItinerariesV2Bean getItineraries(ItinerariesBean itineraries) {
ItinerariesV2Bean bean = new ItinerariesV2Bean();
bean.setFrom(getLocation(itineraries.getFrom()));
bean.setTo(getLocation(itineraries.getTo()));
List<ItineraryBean> its = itineraries.getItineraries();
if (!CollectionsLibrary.isEmpty(its)) {
List<ItineraryV2Bean> beans = new ArrayList<ItineraryV2Bean>(its.size());
for (ItineraryBean itinerary : its) {
ItineraryV2Bean itBean = getItinerary(itinerary);
beans.add(itBean);
}
bean.setItineraries(beans);
}
return bean;
}