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

org.opentripplanner.api.mapping.VertexTypeMapper Maven / Gradle / Ivy

There is a newer version: 2.5.0
Show newest version
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());
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy