package com.pandoli365.bibimbap.jam;

public enum JamStatus {
    RECRUIT,
    DEV,
    EVAL,
    CLOSED;

    public static boolean isValid(String key) {
        if (key == null) {
            return false;
        }
        try {
            valueOf(key);
            return true;
        } catch (IllegalArgumentException e) {
            return false;
        }
    }

    public static JamStatus from(String key) {
        if (key == null) {
            return null;
        }
        try {
            return valueOf(key);
        } catch (IllegalArgumentException e) {
            return null;
        }
    }
}
