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

/**
 * 多评情况下的合分策略
 * 
 * @author luoshi
 *
 */
public enum ScorePolicy {
    AVG("平均分", 1), MAX("最高分", 2), MIN("最低分", 3);

    private String name;

    private int value;

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

    public String getName() {
        return name;
    }

    public int getValue() {
        return value;
    }

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