Class JsonMergePatch.Builder
java.lang.Object
cloud.opencode.base.json.patch.JsonMergePatch.Builder
- Enclosing class:
JsonMergePatch
Builder for JsonMergePatch.
JsonMergePatch 的构建器。
- Since:
- JDK 25, opencode-base-json V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Method Summary
Modifier and TypeMethodDescriptionBuilds and applies the patch to a target.build()Builds the merge patch.Removes a property (sets it to null in patch).Sets a boolean property value.Sets a property value.Sets a number property value.Sets a string property value.
-
Method Details
-
set
Sets a property value. 设置属性值。- Parameters:
key- the property name - 属性名value- the value - 值- Returns:
- this builder - 此构建器
-
set
Sets a string property value. 设置字符串属性值。- Parameters:
key- the property name - 属性名value- the value - 值- Returns:
- this builder - 此构建器
-
set
Sets a number property value. 设置数字属性值。- Parameters:
key- the property name - 属性名value- the value - 值- Returns:
- this builder - 此构建器
-
set
Sets a boolean property value. 设置布尔属性值。- Parameters:
key- the property name - 属性名value- the value - 值- Returns:
- this builder - 此构建器
-
remove
Removes a property (sets it to null in patch). 移除属性(在补丁中设置为 null)。- Parameters:
key- the property name - 属性名- Returns:
- this builder - 此构建器
-
build
-
apply
-