public enum SeeyonCurrencyConstant {
CURRENCY_HKD("-8067278740146205859", "HKD"),
CURRENCY_CNY("1559436427575380745", "CNY"),
CURRENCY_USD("-8872147488443710761", "USD"),
private String code;
private String value;
public String getCode() {return code;}
public String getValue() {return value;}
SeeyonCurrencyConstant(String code, String value) {
this.code = code;
this.value = value;
}
public static String getCodeByVal(String value) {
SeeyonCurrencyConstant[] types = values();
for (SeeyonCurrencyConstant x : types) {
if (x.getValue().equals(value)) {
return x.getCode();
}
}
return null;
}
}
|