package com.qmth.themis.common.enums;

public enum Source {

    ADMIN_WEB, ADMIN_CLIENT, OE_CLIENT, OE_ANSWER, MOBILE_MONITOR_FIRST, MOBILE_MONITOR_SECOND;

    public static Source findByName(String name) {
        if (name == null) {
            return null;
        }
        for (Source item : Source.values()) {
            if (item.toString().equalsIgnoreCase(name)) {
                return item;
            }
        }
        return null;
    }

    public boolean equals(String name) {
        return toString().equalsIgnoreCase(name);
    }
}
