* walk through defs1 and process all entries found in
* both defs1 & defs2 and those found only in defs1
*/
for (Map.Entry<QNodeDefinitionId, QNodeDefinition> entry1 : defs1.entrySet()) {
QNodeDefinitionId id = entry1.getKey();
QNodeDefinition def1 = entry1.getValue();
QNodeDefinition def2 = defs2.get(id);
ChildNodeDefDiff diff = new ChildNodeDefDiff(def1, def2);
if (diff.getType() > maxType) {
maxType = diff.getType();
}
childNodeDefDiffs.add(diff);
defs2.remove(id);
}
/**
* defs2 by now only contains entries found in defs2 only;
* walk through defs2 and process all remaining entries
*/
for (Map.Entry<QNodeDefinitionId, QNodeDefinition> entry2 : defs2.entrySet()) {
QNodeDefinition def2 = entry2.getValue();
ChildNodeDefDiff diff = new ChildNodeDefDiff(null, def2);
if (diff.getType() > maxType) {
maxType = diff.getType();
}
childNodeDefDiffs.add(diff);