Record Class StructuredPatch
A present structured value's requested changes: exactly the supplied nested members, in the
application type's declaration order as the configured Jackson runtime resolves it. Omission is
implied by absence — a member that is not present in members() was not supplied —
mirroring the top-level PatchCommand.changes() philosophy. An empty members()
list means the structured value was supplied as an explicit empty object (present, zero nested
changes); it is never a clear-all or delete operation.
This is a payload, not a PatchChange variant. A recursively traversed attribute
appears as an PatchChange.AttributeChange whose value is a StructuredPatch;
recursively traversed resource or relationship meta uses the corresponding meta change variant
with the same payload. Consumers discriminate it from an atomic replacement with
instanceof and decide how to apply the requested nested changes.
Immutability: StructuredPatch and its members freeze recursively at construction;
atomic container values use the same shallow-freeze convention as PatchChange.
-
Constructor Summary
ConstructorsConstructorDescriptionStructuredPatch(List<StructuredMember> members) Creates an instance of aStructuredPatchrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.members()Returns the value of themembersrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
StructuredPatch
Creates an instance of aStructuredPatchrecord class.- Parameters:
members- the value for themembersrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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). -
members
Returns the value of themembersrecord component.- Returns:
- the value of the
membersrecord component
-