comparison src/main/csharp/jp.ac.u-ryukyu.ie.cr/jungle/transaction/DefaultTreeNode.cs @ 7:02b2ab7bffe6

fix
author Kazuma
date Tue, 27 Sep 2016 18:36:05 +0900
parents dec15de2c6ff
children
comparison
equal deleted inserted replaced
5:0428c8888abf 7:02b2ab7bffe6
1 using UnityEngine; 1 using UnityEngine;
2 public class DefaultTreeNode : TreeNode { 2 public class DefaultTreeNode : TreeNode {
3 private List<TreeNode> children; 3 private List<TreeNode> children;
4 private TreeMap<string,GameObject> attrs; 4 private TreeMap<string,byte[]> attrs;
5 // string nodeId = new VMID().toString(); 5 // string nodeId = new VMID().toString();
6 6
7 private static List<TreeNode> NIL_LIST = new List<TreeNode>(); 7 private static readonly List<TreeNode> NIL_LIST = new List<TreeNode>();
8 8
9 public DefaultTreeNode() 9 public DefaultTreeNode()
10 : this (NIL_LIST, new TreeMap<string,GameObject> ()) 10 : this (NIL_LIST, new TreeMap<string,byte[]> ())
11 { 11 {
12 } 12 }
13 13
14 public DefaultTreeNode(List<TreeNode> _children, TreeMap<string, GameObject> _attrs) { 14 public DefaultTreeNode(List<TreeNode> _children, TreeMap<string, byte[]> _attrs) {
15 attrs = _attrs; 15 attrs = _attrs;
16 children = _children; 16 children = _children;
17 } 17 }
18 18
19 public TreeNodeChildren getChildren() { 19 public TreeNodeChildren getChildren() {
31 public DefaultTreeNode clone() { 31 public DefaultTreeNode clone() {
32 return new DefaultTreeNode(children, attrs); 32 return new DefaultTreeNode(children, attrs);
33 } 33 }
34 34
35 public Either<Error, TreeNode> appendRootNode() { 35 public Either<Error, TreeNode> appendRootNode() {
36 TreeNodeChildren newRootChildren = new DefaultTreeNodeChildren(NIL_LIST, new TreeMap<string,GameObject>()); 36 TreeNodeChildren newRootChildren = new DefaultTreeNodeChildren(NIL_LIST, new TreeMap<string, byte[]>());
37 Either<Error, TreeNode> either = newRootChildren.addNewChildAt(0,this); 37 Either<Error, TreeNode> either = newRootChildren.addNewChildAt(0,this);
38 return either; 38 return either;
39 } 39 }
40 40
41 public int compareTo(TreeNode o) { 41 public int compareTo(TreeNode o) {