-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFinalResult.java
More file actions
38 lines (30 loc) · 885 Bytes
/
FinalResult.java
File metadata and controls
38 lines (30 loc) · 885 Bytes
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
package lt.firm.product.models.Controller.Dashboard;
import java.math.BigDecimal;
import java.util.Comparator;
/**
*/
public class FinalResult {
public Double value;
public String writeDate;
public BigDecimal targetValue;
public FinalResult() {
}
public FinalResult(Double value, String writeDate) {
this.value = value;
this.writeDate = writeDate;
}
public static Comparator<FinalResult> getCompByWriteDate() {
return Comparator.comparing(s -> s.writeDate);
}
public BigDecimal valueAsBigDecimal(){
return value !=null ? BigDecimal.valueOf(value) : null;
}
@Override
public String toString() {
return "FinalResult{" +
"value=" + value +
", writeDate='" + writeDate + '\'' +
", targetValue=" + targetValue +
'}';
}
}