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 DOMAIN(2); 17 18 private final int value; 19 MyEnum(int value)20 private MyEnum(int value) { 21 this.value = value; 22 } 23 24 /** 25 * Get the integer value of this enum value, as defined in the Thrift IDL. 26 */ getValue()27 public int getValue() { 28 return value; 29 } 30 31 /** 32 * Find a the enum type by its integer value, as defined in the Thrift IDL. 33 * @return null if the value is not found. 34 */ findByValue(int value)35 public static MyEnum findByValue(int value) { 36 switch (value) { 37 case 0: 38 return MyValue1; 39 case 1: 40 return MyValue2; 41 case 2: 42 return DOMAIN; 43 default: 44 return null; 45 } 46 } 47 } 48