Record Class PatchError.DuplicateMember
java.lang.Object
java.lang.Record
ca.marcusdunn.jsonlens.patch.PatchError.DuplicateMember
- Record Components:
operation- the index of the operationmember- the duplicate name
- All Implemented Interfaces:
PatchError
- Enclosing interface:
PatchError
public static record PatchError.DuplicateMember(int operation, String member)
extends Record
implements PatchError
An operation has a member more than once. An operation must have exactly one
op and one
path (Section 4). The value of other duplicate members is not defined, so they are errors
too.-
Nested Class Summary
Nested classes/interfaces inherited from interface PatchError
PatchError.DuplicateMember, PatchError.FromNotFound, PatchError.InvalidPointer, PatchError.MissingMember, PatchError.MoveIntoChild, PatchError.NotAnArray, PatchError.NotAnObject, PatchError.NotAString, PatchError.PathNotFound, PatchError.RootRemoved, PatchError.TestFailed, PatchError.UnknownOperation, PatchError.ValueNotRepresentable -
Constructor Summary
ConstructorsConstructorDescriptionDuplicateMember(int operation, String member) Creates an instance of aDuplicateMemberrecord 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.member()Returns the value of thememberrecord component.intReturns the value of theoperationrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface PatchError
message
-
Constructor Details
-
DuplicateMember
-
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
operation
-
member
-