![JAR search and dependency download from the Maven repository](/logo.png)
com.graphhopper.routing.ev.MaxWeightExcept Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of graphhopper-core Show documentation
Show all versions of graphhopper-core Show documentation
GraphHopper is a fast and memory efficient Java road routing engine
working seamlessly with OpenStreetMap data.
package com.graphhopper.routing.ev;
import com.graphhopper.util.Helper;
/**
* When the max_weight EncodedValue is not legally binding. E.g. if there is a sign that a delivery vehicle can access
* the road (even if larger than maxweight tag) then DELIVERY of this enum will be set.
*/
public enum MaxWeightExcept {
NONE, DELIVERY, DESTINATION, FORESTRY;
public static final String KEY = "max_weight_except";
public static EnumEncodedValue create() {
return new EnumEncodedValue<>(MaxWeightExcept.KEY, MaxWeightExcept.class);
}
@Override
public String toString() {
return Helper.toLowerCase(super.toString());
}
public static MaxWeightExcept find(String name) {
if (name == null || name.isEmpty())
return NONE;
try {
return MaxWeightExcept.valueOf(Helper.toUpperCase(name));
} catch (IllegalArgumentException ex) {
return NONE;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy