class DirectionApiLogic {

	public TravelMode getTravelMode(String mode) {
		switch (mode.toLowerCase()) {
		case "driving":
		case "car":
			return TravelMode.DRIVING;
		case "bicycling":
		case "bicycle":
		case "bike":
			return TravelMode.BICYCLING;
		case "transit":
		case "public transport":
		case "public transit":
		case "transport":
			return TravelMode.TRANSIT;
		case "walking":
		case "walk":
			return TravelMode.WALKING;
		default:
			return null;
		}
	}

}