package cgmblelib.Enum;

/**
 * Created by minyuchun on 2019/1/29.
 * @author minyuchun
 */

public enum enumUnBind {
    /**
     * 默认解除绑定
     */
    NONE(0),
    /**
     * 强制解除绑定
     */
    UNBIND_FORCE(1),
    /**
     * 发射器重置 被动解除绑定
     */
    UNBIND_RESET(2),
    /**
     * 命令解除绑定
     */
    UNBIND_COMMAND(3),
    ;

    private int type;

    enumUnBind(int type){
        this.type = type;
    }

    public int getType() {
        return type;
    }

    public static enumUnBind getEnumUnBind(int id){
        for (enumUnBind e : enumUnBind.values()) {
            if (id == e.getType()) {
                return e;
            }
        }
        return NONE;
    }

    @Override
    public String toString() {
        return "enumUnBind{" +
                "type=" + type +
                '}';
    }
}
