private GoogleMapsDirectionJson creategMapsDirectionJson( String durationText, int durationSeconds) { GoogleMapsDirectionJson googleMapsDirectionJson = new GoogleMapsDirectionJson(); Legs legs = new Legs(); Duration duration = new Duration(durationText, durationSeconds); legs.setDuration(duration); googleMapsDirectionJson.setLegs(legs); return googleMapsDirectionJson; }
private TravelTime createTravelTime(String durationText, int durationSeconds) { TravelTime travelTime = new TravelTime(); GoogleMapsDirectionJson googleMapsDirectionJson = new GoogleMapsDirectionJson(); Legs legs = new Legs(); Duration duration = new Duration(durationText, durationSeconds); legs.setDuration(duration); googleMapsDirectionJson.setLegs(legs); travelTime.setGoogleMapsDirectionJson(googleMapsDirectionJson); return travelTime; }