public enum Code {
E1330("MERCOSUR (SOUTH AMERICAN COMMON MARKET)"),
E0257("Guinea Biss."),
E0252("Gambia");
private Code(String value){
setStringValue(value);
}
private Code (int value) {
setIntValue(value);
}
private int intValue;
private String stringValue;
public String getStringValue() {
return stringValue;
}
public int getIntValue() {
return intValue;
}
public void setStringValue(String value) {
this.stringValue = value;
}
public void setIntValue(int value) {
this.intValue = value;
}
}
如何获取值为“冈比亚”的代码的字段名称?-> 应该是 E0252
谢谢