Package org.ghotibeaun.json.merge
Class AbstractMergeProcessor
java.lang.Object
org.ghotibeaun.json.merge.AbstractMergeProcessor
- All Implemented Interfaces:
MergeProcess
public abstract class AbstractMergeProcessor extends Object implements MergeProcess
-
Constructor Summary
Constructors Constructor Description AbstractMergeProcessor() -
Method Summary
Modifier and Type Method Description JSONArrayConflictStrategygetArrayConflictStrategy()Return the the Conflict Strategy to apply to JSONArray nodesMergeResultgetMergeResultStrategy()Return the specified merge result strategyJSONObjectConflictStrategygetObjectConflictStrategy()Return the Conflict Strategy to apply to JSONObject nodes<T extends JSONNode>
TmergeNodes(T primary, T secondary)Return the merged result
-
Constructor Details
-
AbstractMergeProcessor
public AbstractMergeProcessor()
-
-
Method Details
-
getMergeResultStrategy
Description copied from interface:MergeProcessReturn the specified merge result strategy- Specified by:
getMergeResultStrategyin interfaceMergeProcess
-
getArrayConflictStrategy
Description copied from interface:MergeProcessReturn the the Conflict Strategy to apply to JSONArray nodes- Specified by:
getArrayConflictStrategyin interfaceMergeProcess
-
getObjectConflictStrategy
Description copied from interface:MergeProcessReturn the Conflict Strategy to apply to JSONObject nodes- Specified by:
getObjectConflictStrategyin interfaceMergeProcess
-
mergeNodes
Description copied from interface:MergeProcessReturn the merged result- Specified by:
mergeNodesin interfaceMergeProcess- Type Parameters:
T- The JSON node type- Parameters:
primary- the primary node in the merge operationsecondary- the secondary node in the merge operation- Returns:
- the merged node
-