Projekt

Obecné

Profil

Stáhnout (2.81 KB) Statistiky
| Větev: | Revize:
1
package vldc.aswi.model.table;
2

    
3
import java.util.ArrayList;
4
import java.util.List;
5

    
6
/**
7
 * Class representing a node in a tree of row or column values.
8
 */
9
public class Node {
10

    
11
    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
    private boolean isUsable;
28

    
29
    /**
30
     * Values of the nodes on a path the the node.
31
     */
32
    private List<String> values;
33

    
34
    /**
35
     * Creates a node.
36
     */
37
    public Node() {
38
        this.isFirstMin = true;
39
        this.isFirstMax = true;
40
        this.values = new ArrayList<>();
41
        this.isUsable = true;
42
    }
43

    
44
    /**
45
     * Creates a node with the same values as the given node.
46
     * @param node node to be copied
47
     */
48
    public Node(Node node) {
49
        this.isFirstMin = true;
50
        this.isFirstMax = true;
51
        this.values = new ArrayList<>(node.values);
52
        this.isUsable = true;
53
    }
54

    
55
    /**
56
     * Gets values.
57
     * @return values.
58
     */
59
    public List<String> getValues() {
60
        return values;
61
    }
62

    
63
    /**
64
     * Sets values.
65
     * @param values values.
66
     */
67
    public void setValues(List<String> values) {
68
        this.values = values;
69
    }
70

    
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

    
135
    public boolean isUsable() {
136
        return isUsable;
137
    }
138

    
139
    public void setUsable(boolean usable) {
140
        isUsable = usable;
141
    }
142
}
(4-4/6)