Class AcceptSecondaryConflictStrategy
java.lang.Object
org.ghotibeaun.json.merge.strategies.AbstractConflictStrategy<JSONObject,String>
org.ghotibeaun.json.merge.strategies.AbstractJSONObjectConflictStrategy
org.ghotibeaun.json.merge.strategies.AcceptSecondaryConflictStrategy
- All Implemented Interfaces:
ConflictStrategy<JSONObject,String>
,JSONObjectConflictStrategy
public class AcceptSecondaryConflictStrategy extends AbstractJSONObjectConflictStrategy
- Author:
- Jim Earley (jim.earley@fdiinc.com)
-
Constructor Summary
Constructors Constructor Description AcceptSecondaryConflictStrategy(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
-
AcceptSecondaryConflictStrategy
- Parameters:
mergeProcessor
-
-
-
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
-