org.opentripplanner.geocoder.GeocoderResults Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of otp Show documentation
Show all versions of otp Show documentation
The OpenTripPlanner multimodal journey planning system
package org.opentripplanner.geocoder;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.ArrayList;
import java.util.Collection;
public class GeocoderResults {
private String error;
private Collection results;
public GeocoderResults() {}
public GeocoderResults(String error) {
this.error = error;
}
public GeocoderResults(Collection results) {
this.results = results;
}
public String getError() {
return error;
}
public void setError(String error) {
this.error = error;
}
@JsonProperty(value="results")
public Collection getResults() {
return results;
}
public void setResults(Collection results) {
this.results = results;
}
public void addResult(GeocoderResult result) {
if (results == null)
results = new ArrayList();
results.add(result);
}
public int getCount() {
return results != null ? results.size() : 0;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy