/** * Autogenerated by Thrift Compiler (0.8.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package org.opentripplanner.api.thrift.definition; import java.util.Map; import java.util.HashMap; import org.apache.thrift.TEnum; public enum TravelMode implements org.apache.thrift.TEnum { BICYCLE(0), WALK(1), CAR(2), CUSTOM_MOTOR_VEHICLE(3), TRAM(4), SUBWAY(5), RAIL(6), ANY_TRAIN(7), ANY_TRANSIT(8); private final int value; private TravelMode(int value) { this.value = value; } /** * Get the integer value of this enum value, as defined in the Thrift IDL. */ public int getValue() { return value; } /** * Find a the enum type by its integer value, as defined in the Thrift IDL. * @return null if the value is not found. */ public static TravelMode findByValue(int value) { switch (value) { case 0: return BICYCLE; case 1: return WALK; case 2: return CAR; case 3: return CUSTOM_MOTOR_VEHICLE; case 4: return TRAM; case 5: return SUBWAY; case 6: return RAIL; case 7: return ANY_TRAIN; case 8: return ANY_TRANSIT; default: return null; } } }