All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.global.api.utils.ReverseIntEnumMap Maven / Gradle / Ivy

There is a newer version: 14.2.3
Show newest version
package com.global.api.utils;

import com.global.api.entities.enums.INumericConstant;

import java.util.HashMap;
import java.util.Map;

public class ReverseIntEnumMap & INumericConstant> {
    private Map map = new HashMap();

    public ReverseIntEnumMap(Class valueType) {
        for(V v: valueType.getEnumConstants()) {
            map.put(v.getValue(), v);
        }
    }

    public V get(int value) {
        return map.get(value);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy