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

org.opentripplanner.graph_builder.module.osm.SafetyFeaturesEditor Maven / Gradle / Ivy

There is a newer version: 2.5.0
Show newest version
package org.opentripplanner.graph_builder.module.osm;

import java.beans.PropertyEditorSupport;

import org.opentripplanner.common.model.P2;

public class SafetyFeaturesEditor extends PropertyEditorSupport {
    private P2 value;

    public void setAsText(String safetyFeatures) {
        String[] strings = safetyFeatures.split(",");
        value = new P2(Double.parseDouble(strings[0]), Double.parseDouble(strings[1]));
    }

    public String getAsText() {
        return value.first + ", " + value.second;
    }

    public Object getValue() {
        return value;
    }

    @SuppressWarnings("unchecked")
    public void setValue(Object object) {
        value = (P2) object;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy