org.opentripplanner.api.mapping.AbsoluteDirectionMapper 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
package org.opentripplanner.api.mapping;
import org.opentripplanner.api.model.ApiAbsoluteDirection;
import org.opentripplanner.model.plan.AbsoluteDirection;
public class AbsoluteDirectionMapper {
public static ApiAbsoluteDirection mapAbsoluteDirection(AbsoluteDirection domain) {
if(domain == null) { return null; }
switch (domain) {
case NORTH: return ApiAbsoluteDirection.NORTH;
case NORTHEAST: return ApiAbsoluteDirection.NORTHEAST;
case EAST: return ApiAbsoluteDirection.EAST;
case SOUTHEAST: return ApiAbsoluteDirection.SOUTHEAST;
case SOUTH: return ApiAbsoluteDirection.SOUTH;
case SOUTHWEST: return ApiAbsoluteDirection.SOUTHWEST;
case WEST: return ApiAbsoluteDirection.WEST;
case NORTHWEST: return ApiAbsoluteDirection.NORTHWEST;
default:
throw new IllegalArgumentException(domain.toString());
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy