All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.opentripplanner.geocoder.GeocoderResults Maven / Gradle / Ivy

There is a newer version: 2.6.0
Show newest version
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