Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- каждый раз при запросе в цикле бегать ?
- public static CurrencyCode valueOf(int value) throws IllegalArgumentException {
- for (CurrencyCode currencyCode : values()) {
- if (currencyCode.value == value) {
- return currencyCode;
- }
- }
- = >
- static Map<Integer, GrantType> ENUM_MAP = new HashMap<>();
- static {
- for(GrantType value : GrantType.values()) {
- ENUM_MAP.put(value.value, value);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment