blob: 008575993a1c4f2092ff61a04d18d1bc6c1ddd82 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.yst.libmlr.converter.entity;
public class Tree {
private String id;
private String comment;
private InternalNode root;
private int nInternalNodes; // number of internal nodes
public Tree() {}
public Tree(String id, String comment) {
this.id = id;
this.comment = comment;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getComment() {
return (comment == null ? "" : comment);
}
public void setComment(String comment) {
this.comment = comment;
}
public InternalNode getRoot() {
return root;
}
public void setRoot(InternalNode root) {
this.root = root;
}
public int getNumInternalNodes() {
return nInternalNodes;
}
public void incrInteralNodes() {
nInternalNodes++;
}
public void setNumInternalNodes(int n) {
nInternalNodes = n;
}
}
|