@SuppressWarnings( "ReturnValueIgnored" ) // Error Prone
	public static Map<String, Object> parseAndApply( Map<String, Object> oldStyleValues,
		Object style, BiFunction<String, Object, Object> applyProperty )
			throws UnknownStyleException, IllegalArgumentException
	{
		// restore previous values
		if( oldStyleValues != null ) {
			for( Map.Entry<String, Object> e : oldStyleValues.entrySet() )
				applyProperty.apply( e.getKey(), e.getValue() );
		}

		// ignore empty style
		if( style == null )
			return null;

		if( style instanceof String ) {
			// handle style in CSS syntax
			String str = (String) style;
			if( StringUtils.isTrimmedEmpty( str ) )
				return null;

			return applyStyle( parse( str ), applyProperty );
		} else if( style instanceof Map ) {
			// handle style of type Map
			@SuppressWarnings( "unchecked" )
			Map<String, Object> map = (Map<String, Object>) style;
			return applyStyle( map, applyProperty );
		} else
			return null;
	}
Parses styles in CSS syntax ("key1: value1; key2: value2; ..."),
converts the value strings into binary and invokes the given function
to apply the properties.

@param oldStyleValues map of old values modified by the previous invocation, or {@code null}
@param style the style in CSS syntax as string, or a Map, or {@code null}
@param applyProperty function that is invoked to apply the properties;
                     first parameter is the key, second the binary value;
                     the function must return the old value
@return map of old values modified by the given style, or {@code null}
@throws UnknownStyleException on unknown style keys
@throws IllegalArgumentException on syntax errors
@throws ClassCastException if value type does not fit to expected type
flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatStylingSupport.java