Record Class JsonPatch.PatchOperation
java.lang.Object
java.lang.Record
cloud.opencode.base.json.patch.JsonPatch.PatchOperation
- Enclosing class:
JsonPatch
public static record JsonPatch.PatchOperation(JsonPatch.Operation op, String path, String from, JsonNode value)
extends Record
Single patch operation
单个补丁操作
- Since:
- JDK 25, opencode-base-json V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Constructor Summary
ConstructorsConstructorDescriptionPatchOperation(JsonPatch.Operation op, String path) PatchOperation(JsonPatch.Operation op, String path, JsonNode value) PatchOperation(JsonPatch.Operation op, String path, String from) PatchOperation(JsonPatch.Operation op, String path, String from, JsonNode value) Creates an instance of aPatchOperationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.from()Returns the value of thefromrecord component.final inthashCode()Returns a hash code value for this object.op()Returns the value of theoprecord component.path()Returns the value of thepathrecord component.final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
PatchOperation
-
PatchOperation
-
PatchOperation
-
PatchOperation
Creates an instance of aPatchOperationrecord class.- Parameters:
op- the value for theoprecord componentpath- the value for thepathrecord componentfrom- the value for thefromrecord componentvalue- the value for thevaluerecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
op
Returns the value of theoprecord component.- Returns:
- the value of the
oprecord component
-
path
Returns the value of thepathrecord component.- Returns:
- the value of the
pathrecord component
-
from
Returns the value of thefromrecord component.- Returns:
- the value of the
fromrecord component
-
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-