1 | package pl.zankowski.iextrading4j.api.stocks; | |
2 | ||
3 | import com.fasterxml.jackson.annotation.JsonCreator; | |
4 | import com.fasterxml.jackson.annotation.JsonProperty; | |
5 | import com.google.common.base.MoreObjects; | |
6 | import com.google.common.base.Objects; | |
7 | ||
8 | import java.io.Serializable; | |
9 | import java.math.BigDecimal; | |
10 | import java.time.LocalDate; | |
11 | ||
12 | public class Split implements Serializable { | |
13 | ||
14 | private static final long serialVersionUID = 1723133824483798201L; | |
15 | ||
16 | private final LocalDate exDate; | |
17 | private final LocalDate declaredDate; | |
18 | private final LocalDate recordDate; | |
19 | private final LocalDate paymentDate; | |
20 | private final BigDecimal ratio; | |
21 | private final BigDecimal toFactor; | |
22 | private final BigDecimal forFactor; | |
23 | ||
24 | @JsonCreator | |
25 | public Split( | |
26 | @JsonProperty("exDate") final LocalDate exDate, | |
27 | @JsonProperty("declaredDate") final LocalDate declaredDate, | |
28 | @JsonProperty("recordDate") final LocalDate recordDate, | |
29 | @JsonProperty("paymentDate") final LocalDate paymentDate, | |
30 | @JsonProperty("ratio") final BigDecimal ratio, | |
31 | @JsonProperty("toFactor") final BigDecimal toFactor, | |
32 | @JsonProperty("forFactor") final BigDecimal forFactor) { | |
33 | this.exDate = exDate; | |
34 | this.declaredDate = declaredDate; | |
35 | this.recordDate = recordDate; | |
36 | this.paymentDate = paymentDate; | |
37 | this.ratio = ratio; | |
38 | this.toFactor = toFactor; | |
39 | this.forFactor = forFactor; | |
40 | } | |
41 | ||
42 | public LocalDate getExDate() { | |
43 |
1
1. getExDate : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/Split::getExDate → KILLED |
return exDate; |
44 | } | |
45 | ||
46 | public LocalDate getDeclaredDate() { | |
47 |
1
1. getDeclaredDate : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/Split::getDeclaredDate → KILLED |
return declaredDate; |
48 | } | |
49 | ||
50 | public LocalDate getRecordDate() { | |
51 |
1
1. getRecordDate : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/Split::getRecordDate → KILLED |
return recordDate; |
52 | } | |
53 | ||
54 | public LocalDate getPaymentDate() { | |
55 |
1
1. getPaymentDate : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/Split::getPaymentDate → KILLED |
return paymentDate; |
56 | } | |
57 | ||
58 | public BigDecimal getRatio() { | |
59 |
1
1. getRatio : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/Split::getRatio → KILLED |
return ratio; |
60 | } | |
61 | ||
62 | public BigDecimal getToFactor() { | |
63 |
1
1. getToFactor : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/Split::getToFactor → KILLED |
return toFactor; |
64 | } | |
65 | ||
66 | public BigDecimal getForFactor() { | |
67 |
1
1. getForFactor : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/Split::getForFactor → KILLED |
return forFactor; |
68 | } | |
69 | ||
70 | @Override | |
71 | public boolean equals(Object o) { | |
72 |
2
1. equals : negated conditional → KILLED 2. equals : replaced boolean return with false for pl/zankowski/iextrading4j/api/stocks/Split::equals → KILLED |
if (this == o) return true; |
73 |
3
1. equals : negated conditional → KILLED 2. equals : negated conditional → KILLED 3. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/stocks/Split::equals → KILLED |
if (o == null || getClass() != o.getClass()) return false; |
74 | Split split = (Split) o; | |
75 |
2
1. equals : negated conditional → KILLED 2. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/stocks/Split::equals → KILLED |
return Objects.equal(exDate, split.exDate) && |
76 |
1
1. equals : negated conditional → KILLED |
Objects.equal(declaredDate, split.declaredDate) && |
77 |
1
1. equals : negated conditional → KILLED |
Objects.equal(recordDate, split.recordDate) && |
78 |
1
1. equals : negated conditional → KILLED |
Objects.equal(paymentDate, split.paymentDate) && |
79 |
1
1. equals : negated conditional → KILLED |
Objects.equal(ratio, split.ratio) && |
80 |
1
1. equals : negated conditional → KILLED |
Objects.equal(toFactor, split.toFactor) && |
81 |
1
1. equals : negated conditional → KILLED |
Objects.equal(forFactor, split.forFactor); |
82 | } | |
83 | ||
84 | @Override | |
85 | public int hashCode() { | |
86 |
1
1. hashCode : replaced int return with 0 for pl/zankowski/iextrading4j/api/stocks/Split::hashCode → KILLED |
return Objects.hashCode(exDate, declaredDate, recordDate, paymentDate, ratio, |
87 | toFactor, forFactor); | |
88 | } | |
89 | ||
90 | @Override | |
91 | public String toString() { | |
92 |
1
1. toString : replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/Split::toString → KILLED |
return MoreObjects.toStringHelper(this) |
93 | .add("exDate", exDate) | |
94 | .add("declaredDate", declaredDate) | |
95 | .add("recordDate", recordDate) | |
96 | .add("paymentDate", paymentDate) | |
97 | .add("ratio", ratio) | |
98 | .add("toFactor", toFactor) | |
99 | .add("forFactor", forFactor) | |
100 | .toString(); | |
101 | } | |
102 | } | |
Mutations | ||
43 |
1.1 |
|
47 |
1.1 |
|
51 |
1.1 |
|
55 |
1.1 |
|
59 |
1.1 |
|
63 |
1.1 |
|
67 |
1.1 |
|
72 |
1.1 2.2 |
|
73 |
1.1 2.2 3.3 |
|
75 |
1.1 2.2 |
|
76 |
1.1 |
|
77 |
1.1 |
|
78 |
1.1 |
|
79 |
1.1 |
|
80 |
1.1 |
|
81 |
1.1 |
|
86 |
1.1 |
|
92 |
1.1 |