/** * Autogenerated by Thrift * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ import com.facebook.thrift.IntRangeSet; import java.util.Map; import java.util.HashMap; @SuppressWarnings({ "unused" }) public enum MyEnum implements com.facebook.thrift.TEnum { MyValue1(0), MyValue2(1), MyValue3(3), MyValue4(4), MyValue5(5); private final int value; private MyEnum(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 MyEnum findByValue(int value) { switch (value) { case 0: return MyValue1; case 1: return MyValue2; case 3: return MyValue3; case 4: return MyValue4; case 5: return MyValue5; default: return null; } } }