Record Class MergePatchError.TargetDuplicateName
java.lang.Object
java.lang.Record
ca.marcusdunn.jsonlens.mergepatch.MergePatchError.TargetDuplicateName
- Record Components:
path- the location of the object in the target. It is also the location of the object of the patch that merges into it.name- the duplicate name
- All Implemented Interfaces:
MergePatchError
- Enclosing interface:
MergePatchError
public static record MergePatchError.TargetDuplicateName(List<String> path, String name)
extends Record
implements MergePatchError
An object of the target has a member name more than once, and the patch has a member with that name for the object. The target member to change is not defined.
A model that implements JsonEditor has unique names, so only JsonMergePatch.applyToCopy(N, M)
can give this error.
-
Nested Class Summary
Nested classes/interfaces inherited from interface MergePatchError
MergePatchError.DuplicateName, MergePatchError.TargetDuplicateName, MergePatchError.ValueNotRepresentable -
Constructor Summary
Constructors -
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.name()Returns the value of thenamerecord component.path()Returns the value of thepathrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface MergePatchError
message
-
Constructor Details
-
TargetDuplicateName
-
-
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). -
path
-
name
-