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 JSONArrayConflictStrategy
getArrayConflictStrategy()
Return the the Conflict Strategy to apply to JSONArray nodesMergeResult
getMergeResultStrategy()
Return the specified merge result strategyJSONObjectConflictStrategy
getObjectConflictStrategy()
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:MergeProcess
Return the specified merge result strategy- Specified by:
getMergeResultStrategy
in interfaceMergeProcess
-
getArrayConflictStrategy
Description copied from interface:MergeProcess
Return the the Conflict Strategy to apply to JSONArray nodes- Specified by:
getArrayConflictStrategy
in interfaceMergeProcess
-
getObjectConflictStrategy
Description copied from interface:MergeProcess
Return the Conflict Strategy to apply to JSONObject nodes- Specified by:
getObjectConflictStrategy
in interfaceMergeProcess
-
mergeNodes
Description copied from interface:MergeProcess
Return the merged result- Specified by:
mergeNodes
in 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
-