1 Clazz.declarePackage ("jalview.datamodel");
2 c$ = Clazz.decorateAsClass (function () {
9 Clazz.instantialize (this, arguments);
10 }, jalview.datamodel, "BinaryNode");
11 Clazz.makeConstructor (c$,
13 this.$left = this.$right = this.$parent = null;
16 Clazz.makeConstructor (c$,
17 function (element, parent, name) {
18 this.$element = element;
19 this.$parent = parent;
21 this.$left = this.$right = null;
22 }, "~O,jalview.datamodel.BinaryNode,~S");
23 Clazz.defineMethod (c$, "element",
27 Clazz.defineMethod (c$, "setElement",
29 return this.$element = v;
31 Clazz.defineMethod (c$, "left",
35 Clazz.defineMethod (c$, "setLeft",
37 return this.$left = n;
38 }, "jalview.datamodel.BinaryNode");
39 Clazz.defineMethod (c$, "right",
43 Clazz.defineMethod (c$, "setRight",
45 return this.$right = n;
46 }, "jalview.datamodel.BinaryNode");
47 Clazz.defineMethod (c$, "parent",
51 Clazz.defineMethod (c$, "setParent",
53 return this.$parent = n;
54 }, "jalview.datamodel.BinaryNode");
55 Clazz.defineMethod (c$, "isLeaf",
57 return (this.$left == null) && (this.$right == null);
59 Clazz.defineMethod (c$, "SetChildren",
60 function (leftchild, rightchild) {
61 if (leftchild != null) {
62 this.setLeft (leftchild);
64 leftchild.setParent (this);
65 }if (rightchild != null) {
66 this.setRight (rightchild);
68 rightchild.setParent (this);
69 }}, "jalview.datamodel.BinaryNode,jalview.datamodel.BinaryNode");
70 Clazz.defineMethod (c$, "detach",
72 if (this.$parent != null) {
73 if (this.$parent.$left === this) {
74 this.$parent.$left = null;
76 if (this.$parent.$right === this) {
77 this.$parent.$right = null;
78 }}}this.$parent = null;
81 Clazz.defineMethod (c$, "ascendLeft",
86 } while ((c != null) && (c.left () != null) && !c.left ().isLeaf ());
89 Clazz.defineMethod (c$, "ascendRight",
94 } while ((c != null) && (c.right () != null) && !c.right ().isLeaf ());
97 Clazz.defineMethod (c$, "setName",
101 Clazz.defineMethod (c$, "getName",
105 Clazz.defineMethod (c$, "setBootstrap",
107 this.bootstrap = boot;
109 Clazz.defineMethod (c$, "getBootstrap",
111 return this.bootstrap;