public static CaptureStyle getCaptureStyleValue(Map<String, Object> yamlObject,
            String key, boolean allowsEmpty) throws YamlConvertException {
        Object obj = getObjectValue(yamlObject, key, allowsEmpty);
        if (obj == null && allowsEmpty) {
            return null;
        }
        String objStr;
        if (obj == null) {
            objStr = null;
        } else {
            objStr = obj.toString();
        }
        CaptureStyle result = CaptureStyle.getEnum(objStr);
        if (result != null) {
            return result;
        } else {
            throw new YamlConvertException(String.format(MSG_VALUE_NOT_CAPTURE_STYLE, key, objStr));
        }
    }
public static CaptureStyle getCaptureStyleValue ( Map < String , Object > yamlObject , String key , boolean allowsEmpty ) throws YamlConvertException { Object obj = getObjectValue ( yamlObject , key , allowsEmpty ) ; if ( obj == null && allowsEmpty ) { return null ; } String objStr ; if ( obj == null ) { objStr = null ; } else { objStr = obj . toString ( ) ; } CaptureStyle result = CaptureStyle . getEnum ( objStr ) ; if ( result != null ) { return result ; } else { throw new YamlConvertException ( String . format ( MSG_VALUE_NOT_CAPTURE_STYLE , key , objStr ) ) ; } }
if allowsEmpty, returns null for the case no key entry or null value