1 |
efcabc4d
|
mlinha
|
package vldc.aswi.model.table;
|
2 |
|
|
|
3 |
|
|
import java.util.ArrayList;
|
4 |
|
|
import java.util.List;
|
5 |
|
|
|
6 |
cc39413d
|
mlinha
|
/**
|
7 |
|
|
* Class representing a node in a tree of row or column values.
|
8 |
|
|
*/
|
9 |
efcabc4d
|
mlinha
|
public class Node {
|
10 |
|
|
|
11 |
f30c9e9e
|
mlinha
|
private double totalResult;
|
12 |
|
|
|
13 |
|
|
private double totalResultAvg;
|
14 |
|
|
|
15 |
|
|
private double totalResultAvgSum;
|
16 |
|
|
|
17 |
|
|
private double totalResultSum;
|
18 |
|
|
|
19 |
|
|
private double totalMin;
|
20 |
|
|
|
21 |
|
|
private double totalMax;
|
22 |
|
|
|
23 |
|
|
private boolean isFirstMin;
|
24 |
|
|
|
25 |
|
|
private boolean isFirstMax;
|
26 |
|
|
|
27 |
856636e3
|
mlinha
|
private boolean isUsable;
|
28 |
|
|
|
29 |
cc39413d
|
mlinha
|
/**
|
30 |
|
|
* Values of the nodes on a path the the node.
|
31 |
|
|
*/
|
32 |
efcabc4d
|
mlinha
|
private List<String> values;
|
33 |
|
|
|
34 |
cc39413d
|
mlinha
|
/**
|
35 |
|
|
* Creates a node.
|
36 |
|
|
*/
|
37 |
efcabc4d
|
mlinha
|
public Node() {
|
38 |
856636e3
|
mlinha
|
this.isFirstMin = true;
|
39 |
|
|
this.isFirstMax = true;
|
40 |
efcabc4d
|
mlinha
|
this.values = new ArrayList<>();
|
41 |
856636e3
|
mlinha
|
this.isUsable = true;
|
42 |
efcabc4d
|
mlinha
|
}
|
43 |
|
|
|
44 |
cc39413d
|
mlinha
|
/**
|
45 |
|
|
* Creates a node with the same values as the given node.
|
46 |
|
|
* @param node node to be copied
|
47 |
|
|
*/
|
48 |
efcabc4d
|
mlinha
|
public Node(Node node) {
|
49 |
856636e3
|
mlinha
|
this.isFirstMin = true;
|
50 |
|
|
this.isFirstMax = true;
|
51 |
efcabc4d
|
mlinha
|
this.values = new ArrayList<>(node.values);
|
52 |
856636e3
|
mlinha
|
this.isUsable = true;
|
53 |
efcabc4d
|
mlinha
|
}
|
54 |
|
|
|
55 |
cc39413d
|
mlinha
|
/**
|
56 |
|
|
* Gets values.
|
57 |
|
|
* @return values.
|
58 |
|
|
*/
|
59 |
efcabc4d
|
mlinha
|
public List<String> getValues() {
|
60 |
|
|
return values;
|
61 |
|
|
}
|
62 |
|
|
|
63 |
cc39413d
|
mlinha
|
/**
|
64 |
|
|
* Sets values.
|
65 |
|
|
* @param values values.
|
66 |
|
|
*/
|
67 |
efcabc4d
|
mlinha
|
public void setValues(List<String> values) {
|
68 |
|
|
this.values = values;
|
69 |
|
|
}
|
70 |
f30c9e9e
|
mlinha
|
|
71 |
|
|
public double getTotalResult() {
|
72 |
|
|
return totalResult;
|
73 |
|
|
}
|
74 |
|
|
|
75 |
|
|
public void setTotalResult(double totalResult) {
|
76 |
|
|
this.totalResult = totalResult;
|
77 |
|
|
}
|
78 |
|
|
|
79 |
|
|
public double getTotalResultAvg() {
|
80 |
|
|
return totalResultAvg;
|
81 |
|
|
}
|
82 |
|
|
|
83 |
|
|
public void setTotalResultAvg(double totalResultAvg) {
|
84 |
|
|
this.totalResultAvg = totalResultAvg;
|
85 |
|
|
}
|
86 |
|
|
|
87 |
|
|
public double getTotalResultAvgSum() {
|
88 |
|
|
return totalResultAvgSum;
|
89 |
|
|
}
|
90 |
|
|
|
91 |
|
|
public void setTotalResultAvgSum(double totalResultAvgSum) {
|
92 |
|
|
this.totalResultAvgSum = totalResultAvgSum;
|
93 |
|
|
}
|
94 |
|
|
|
95 |
|
|
public double getTotalResultSum() {
|
96 |
|
|
return totalResultSum;
|
97 |
|
|
}
|
98 |
|
|
|
99 |
|
|
public void setTotalResultSum(double totalResultSum) {
|
100 |
|
|
this.totalResultSum = totalResultSum;
|
101 |
|
|
}
|
102 |
|
|
|
103 |
|
|
public double getTotalMin() {
|
104 |
|
|
return totalMin;
|
105 |
|
|
}
|
106 |
|
|
|
107 |
|
|
public void setTotalMin(double totalMin) {
|
108 |
|
|
this.totalMin = totalMin;
|
109 |
|
|
}
|
110 |
|
|
|
111 |
|
|
public double getTotalMax() {
|
112 |
|
|
return totalMax;
|
113 |
|
|
}
|
114 |
|
|
|
115 |
|
|
public void setTotalMax(double totalMax) {
|
116 |
|
|
this.totalMax = totalMax;
|
117 |
|
|
}
|
118 |
|
|
|
119 |
|
|
public boolean isFirstMin() {
|
120 |
|
|
return isFirstMin;
|
121 |
|
|
}
|
122 |
|
|
|
123 |
|
|
public void setFirstMin(boolean firstMin) {
|
124 |
|
|
isFirstMin = firstMin;
|
125 |
|
|
}
|
126 |
|
|
|
127 |
|
|
public boolean isFirstMax() {
|
128 |
|
|
return isFirstMax;
|
129 |
|
|
}
|
130 |
|
|
|
131 |
|
|
public void setFirstMax(boolean firstMax) {
|
132 |
|
|
isFirstMax = firstMax;
|
133 |
|
|
}
|
134 |
856636e3
|
mlinha
|
|
135 |
|
|
public boolean isUsable() {
|
136 |
|
|
return isUsable;
|
137 |
|
|
}
|
138 |
|
|
|
139 |
|
|
public void setUsable(boolean usable) {
|
140 |
|
|
isUsable = usable;
|
141 |
|
|
}
|
142 |
efcabc4d
|
mlinha
|
}
|