public class MergeCombiner extends NodeCombiner
A specialized implementation of the NodeCombiner interface
that performs a merge from two passed in node hierarchies.
This combiner performs the merge using a few rules:
listNodes| Constructor and Description |
|---|
MergeCombiner() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addAttributes(ViewNode result,
ConfigurationNode node1,
ConfigurationNode node2)
Handles the attributes during a combination process.
|
protected ConfigurationNode |
canCombine(ConfigurationNode node1,
ConfigurationNode node2,
ConfigurationNode child,
List<ConfigurationNode> children2)
Tests if the first node can be combined with the second node.
|
ConfigurationNode |
combine(ConfigurationNode node1,
ConfigurationNode node2)
Combines the given nodes to a new union node.
|
addListNode, createViewNode, getListNodes, isListNodepublic ConfigurationNode combine(ConfigurationNode node1, ConfigurationNode node2)
combine in class NodeCombinernode1 - the first source nodenode2 - the second source nodeprotected void addAttributes(ViewNode result, ConfigurationNode node1, ConfigurationNode node2)
result - the resulting nodenode1 - the first nodenode2 - the second nodeprotected ConfigurationNode canCombine(ConfigurationNode node1, ConfigurationNode node2, ConfigurationNode child, List<ConfigurationNode> children2)
node1 - the first nodenode2 - the second nodechild - the child node (of the first node)Copyright © 2001–2013 The Apache Software Foundation. All rights reserved.