class EnumUtilities {

    public static <T extends Enum<T>> T fromString(Class<T> type, String label)
    {
        return EnumSet.allOf(type).stream().filter(v -> v != null && Objects.equals(v.toString(), label)).findAny().orElse(null);
    }

    private  EnumUtilities();

}