org.opentripplanner.api.mapping.VertexTypeMapper 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.ApiVertexType;
import org.opentripplanner.model.plan.VertexType;
public class VertexTypeMapper {
public static ApiVertexType mapVertexType(VertexType domain) {
if(domain == null) { return null; }
switch (domain) {
case NORMAL: return ApiVertexType.NORMAL;
case BIKEPARK: return ApiVertexType.BIKEPARK;
case BIKESHARE: return ApiVertexType.BIKESHARE;
case TRANSIT: return ApiVertexType.TRANSIT;
default:
throw new IllegalArgumentException(domain.toString());
}
}
}