
org.opentripplanner.openstreetmap.wayproperty.SafetyFeatures 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
The newest version!
package org.opentripplanner.openstreetmap.wayproperty;
/**
* Record that holds forward and back safety factors for cycling or walking.
*/
public record SafetyFeatures(double forward, double back) {
public static final SafetyFeatures DEFAULT = new SafetyFeatures(1, 1);
/**
* Does this instance actually modify the safety values?
*/
public boolean modifies() {
return !(forward == 1 && back == 1);
}
/**
* Does forward and back have the same value?
*/
public boolean isSymmetric() {
return forward == back;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy