comparison src/treecms/proto/merge/MergedTreeBuilder.java @ 25:99346c04a3cf

broken
author ShoshiTAMAKI
date Sun, 31 Oct 2010 18:34:02 +0900
parents f0c35d444982
children
comparison
equal deleted inserted replaced
24:f0c35d444982 25:99346c04a3cf
1 package treecms.proto.merge; 1 package treecms.proto.merge;
2 2
3 import treecms.proto.api.Node; 3 import treecms.proto.api.Node;
4
5 import java.util.List;
4 import treecms.proto.api.TreeBuilder; 6 import treecms.proto.api.TreeBuilder;
5 7
6 public class MergedTreeBuilder implements TreeBuilder 8 public class MergedTreeBuilder implements TreeBuilder
7 { 9 {
8 private Node m_root; 10 private Node m_root;
9 11
10 private TreeBuilder m_target1; 12 private TreeBuilder m_target;
11 private TreeBuilder m_target2;
12 13
13 public MergedTreeBuilder(TreeBuilder _target1,TreeBuilder _target2) 14 public MergedTreeBuilder(TreeBuilder _target1,TreeBuilder _target2)
14 { 15 {
15 m_target1 = _target1; 16 Node root1 = _target1.getContents();
16 m_target2 = _target2; 17 Node root2 = _target2.getContents();
18
19 merge(root2,root1);
17 } 20 }
18 21
19 public Node merge(Node _root1,Node _root2) 22 public void merge(Node _target,Node _root)
20 { 23 {
21 Node root = null; 24 List<Node> targetChld = _target.getChildList();
22 25 List<Node> rootChld = _root.getChildList();
23 return root;
24 } 26 }
25 27
26 @Override 28 @Override
27 public Node getContents() 29 public Node getContents()
28 { 30 {