- java.lang.Object
-
- org.eclipse.parsson.JsonMergePatchImpl
-
- All Implemented Interfaces:
JsonMergePatch
public final class JsonMergePatchImpl extends Object implements JsonMergePatch
This class is an implementation of a JSON Merge Patch as specified in RFC 7396.- Since:
- 1.1
-
-
Constructor Summary
Constructors Constructor Description JsonMergePatchImpl(JsonValue patch, org.eclipse.parsson.JsonContext jsonContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonValueapply(JsonValue target)Applies the JSON Merge Patch to the specifiedtarget.booleanequals(Object obj)Compares thisJsonMergePatchImplwith another object.inthashCode()Returns the hash code value for thisJsonMergePatchImpl.JsonValuetoJsonValue()Returns theJsonMergePatchasJsonValue.StringtoString()Returns the JSON Patch text
-
-
-
Constructor Detail
-
JsonMergePatchImpl
public JsonMergePatchImpl(JsonValue patch, org.eclipse.parsson.JsonContext jsonContext)
-
-
Method Detail
-
apply
public JsonValue apply(JsonValue target)
Description copied from interface:JsonMergePatchApplies the JSON Merge Patch to the specifiedtarget. The target is not modified by the patch.- Specified by:
applyin interfaceJsonMergePatch- Parameters:
target- the target to apply the merge patch- Returns:
- the transformed target after the patch
-
toJsonValue
public JsonValue toJsonValue()
Description copied from interface:JsonMergePatchReturns theJsonMergePatchasJsonValue.- Specified by:
toJsonValuein interfaceJsonMergePatch- Returns:
- this
JsonMergePatchasJsonValue
-
equals
public boolean equals(Object obj)
Compares thisJsonMergePatchImplwith another object.
-
hashCode
public int hashCode()
Returns the hash code value for thisJsonMergePatchImpl.
-
-