exceptionfactory commented on code in PR #112:
URL: https://github.com/apache/nifi-api/pull/112#discussion_r4360907994


##########
src/main/java/org/apache/nifi/components/state/StateMap.java:
##########
@@ -48,4 +51,32 @@ public interface StateMap {
      * @return an immutable Map representation of all keys and values for the 
state of a component.
      */
     Map<String, String> toMap();
+
+    /**
+     * Returns an immutable Map of all keys and values for the state of a 
component, with the given patches applied. This StateMap is not changed.
+     * <p>
+     * Each key in the given patches with a non-null value is added or 
overwritten. Each key with a {@code null} value is removed.
+     * Keys that are not in the given patches keep their values from this 
StateMap.
+     * </p>
+     *
+     * @param patches a map of state keys to their new values. A key that is 
mapped to {@code null} is removed from the result. The map itself must not be 
{@code null}.
+     * @return an immutable Map of this state's keys and values with the given 
patches applied
+     */
+    default Map<String, String> toMap(final Map<String, String> patches) {

Review Comment:
   Thanks for the reply, that's fair. With that background, keeping the 
existing naming sounds good



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to