package backend.model.enums;
import java.util.*;

public class GlobalData {
    public static final Map<Integer,String> FREQUENCY_MAP = new HashMap<>();
    static{
        FREQUENCY_MAP.put(0,"未指定");
        FREQUENCY_MAP.put(1,"低频");
        FREQUENCY_MAP.put(2,"中频");
        FREQUENCY_MAP.put(3,"高频");
    }
    public static Integer getFrequencyByValue(String value){
        for(Map.Entry<Integer,String> entry:FREQUENCY_MAP.entrySet()) {
            if (entry.getValue().equals(value))
                return entry.getKey();
        }
        return 0;
    }
}
