Class AcceptPrimaryConflictStrategy
java.lang.Object
org.ghotibeaun.json.merge.strategies.AbstractConflictStrategy<JSONObject,String>
org.ghotibeaun.json.merge.strategies.AbstractJSONObjectConflictStrategy
org.ghotibeaun.json.merge.strategies.AcceptPrimaryConflictStrategy
- All Implemented Interfaces:
ConflictStrategy<JSONObject,String>
,JSONObjectConflictStrategy
public class AcceptPrimaryConflictStrategy extends AbstractJSONObjectConflictStrategy
-
Constructor Summary
Constructors Constructor Description AcceptPrimaryConflictStrategy(MergeProcess mergeProcessor)
-
Method Summary
Modifier and Type Method Description void
apply(JSONObject context, String propertyValue, JSONValue<?> primaryValue, JSONValue<?> secondaryValue)
Apply a conflict strategy to a given JSONNode contextMethods inherited from class org.ghotibeaun.json.merge.strategies.AbstractConflictStrategy
getMergeProcessor
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ghotibeaun.json.merge.strategies.ConflictStrategy
getMergeProcessor
-
Constructor Details
-
AcceptPrimaryConflictStrategy
-
-
Method Details
-
apply
public void apply(JSONObject context, String propertyValue, JSONValue<?> primaryValue, JSONValue<?> secondaryValue)Description copied from interface:ConflictStrategy
Apply a conflict strategy to a given JSONNode context- Parameters:
context
- the JSONNode that receives the "resolved" valuepropertyValue
- either the key or index position of the valueprimaryValue
- the value from the Primary JSONNodesecondaryValue
- the value from the Secondary JSONNode
-