package com.qmth.teachcloud.common.enums;

/**
 * 客观题判断策略
 * 
 */
public enum ObjectivePolicy {
    NONE("全对给全分", 1), ALL("任选给全分", 2), LEAK_HALF("漏选给半分", 3),LEAK("漏选给分", 4);

    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;
    }
}
