1 /** 2 * Autogenerated by Thrift 3 * 4 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 * @generated 6 */ 7 8 import com.facebook.thrift.IntRangeSet; 9 import java.util.Map; 10 import java.util.HashMap; 11 12 @SuppressWarnings({ "unused" }) 13 public enum MyEnum implements com.facebook.thrift.TEnum { 14 MyValue1(0), 15 MyValue2(1), 16 MyValue3(3), 17 MyValue4(4), 18 MyValue5(5); 19 20 private final int value; 21 MyEnum(int value)22 private MyEnum(int value) { 23 this.value = value; 24 } 25 26 /** 27 * Get the integer value of this enum value, as defined in the Thrift IDL. 28 */ getValue()29 public int getValue() { 30 return value; 31 } 32 33 /** 34 * Find a the enum type by its integer value, as defined in the Thrift IDL. 35 * @return null if the value is not found. 36 */ findByValue(int value)37 public static MyEnum findByValue(int value) { 38 switch (value) { 39 case 0: 40 return MyValue1; 41 case 1: 42 return MyValue2; 43 case 3: 44 return MyValue3; 45 case 4: 46 return MyValue4; 47 case 5: 48 return MyValue5; 49 default: 50 return null; 51 } 52 } 53 } 54