package cn.com.qmth.stmms.common.enums;

/**
 * 客观题判断策略
 * 
 */
public enum ObjectivePolicy {
    NONE("无", 1), ALL("任选给分", 2), LEAK("漏选给分", 3), CUSTOMIZE("自定义", 4), PROPORTION("按比例给分", 5);

    private String name;

    private int value;

    private ObjectivePolicy(String name, int value) {
        this.name = name;
        this.value = value;
    }

    public String getName() {
        return name;
    }

    public int getValue() {
        return value;
    }

    public static ObjectivePolicy findByValue(int value) {
        for (ObjectivePolicy c : ObjectivePolicy.values()) {
            if (c.getValue() == value) {
                return c;
            }
        }
        return null;
    }
}
