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

org.opentripplanner.common.model.NamedPlace Maven / Gradle / Ivy

package org.opentripplanner.common.model;

/**
 * A starting/ending location for a trip.
 * 
 * @author novalis
 * 
 */
public class NamedPlace {
    /**
     * some human-readable text string e.g. W 34th St
     * */
    public String name;

    /**
     * "latitude,longitude", or the name of a graph vertex
     */
    public String place;

    public NamedPlace(String name, String place) {
        this.name = name;
        this.place = place;
    }

    public NamedPlace(String place) {
        this.place = place;
    }

    public String getRepresentation() {
        if (name == null) {
            return place;
        }
        return name + "::" + place;
    }

    public String toString() {
        return "NamedPlace(" + name + ", " + place + ")";
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy