1 | package pl.zankowski.iextrading4j.api.stocks.v1; | |
2 | ||
3 | import com.fasterxml.jackson.annotation.JsonCreator; | |
4 | import com.fasterxml.jackson.annotation.JsonProperty; | |
5 | ||
6 | import java.io.Serializable; | |
7 | import java.math.BigDecimal; | |
8 | import java.time.LocalDate; | |
9 | import java.util.Objects; | |
10 | import java.util.StringJoiner; | |
11 | ||
12 | public class PriceTarget implements Serializable { | |
13 | ||
14 | private static final long serialVersionUID = 2641199116590474197L; | |
15 | ||
16 | private final String symbol; | |
17 | private final LocalDate updatedDate; | |
18 | private final BigDecimal priceTargetAverage; | |
19 | private final BigDecimal priceTargetHigh; | |
20 | private final BigDecimal priceTargetLow; | |
21 | private final BigDecimal numberOfAnalysts; | |
22 | private final String currency; | |
23 | ||
24 | @JsonCreator | |
25 | public PriceTarget( | |
26 | @JsonProperty("symbol") final String symbol, | |
27 | @JsonProperty("updatedDate") final LocalDate updatedDate, | |
28 | @JsonProperty("priceTargetAverage") final BigDecimal priceTargetAverage, | |
29 | @JsonProperty("priceTargetHigh") final BigDecimal priceTargetHigh, | |
30 | @JsonProperty("priceTargetLow") final BigDecimal priceTargetLow, | |
31 | @JsonProperty("numberOfAnalysts") final BigDecimal numberOfAnalysts, | |
32 | @JsonProperty("currency") final String currency) { | |
33 | this.symbol = symbol; | |
34 | this.updatedDate = updatedDate; | |
35 | this.priceTargetAverage = priceTargetAverage; | |
36 | this.priceTargetHigh = priceTargetHigh; | |
37 | this.priceTargetLow = priceTargetLow; | |
38 | this.numberOfAnalysts = numberOfAnalysts; | |
39 | this.currency = currency; | |
40 | } | |
41 | ||
42 | public String getSymbol() { | |
43 |
1
1. getSymbol : replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/v1/PriceTarget::getSymbol → KILLED |
return symbol; |
44 | } | |
45 | ||
46 | public LocalDate getUpdatedDate() { | |
47 |
1
1. getUpdatedDate : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/PriceTarget::getUpdatedDate → KILLED |
return updatedDate; |
48 | } | |
49 | ||
50 | public BigDecimal getPriceTargetAverage() { | |
51 |
1
1. getPriceTargetAverage : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/PriceTarget::getPriceTargetAverage → KILLED |
return priceTargetAverage; |
52 | } | |
53 | ||
54 | public BigDecimal getPriceTargetHigh() { | |
55 |
1
1. getPriceTargetHigh : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/PriceTarget::getPriceTargetHigh → KILLED |
return priceTargetHigh; |
56 | } | |
57 | ||
58 | public BigDecimal getPriceTargetLow() { | |
59 |
1
1. getPriceTargetLow : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/PriceTarget::getPriceTargetLow → KILLED |
return priceTargetLow; |
60 | } | |
61 | ||
62 | public BigDecimal getNumberOfAnalysts() { | |
63 |
1
1. getNumberOfAnalysts : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/PriceTarget::getNumberOfAnalysts → KILLED |
return numberOfAnalysts; |
64 | } | |
65 | ||
66 | public String getCurrency() { | |
67 |
1
1. getCurrency : replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/v1/PriceTarget::getCurrency → NO_COVERAGE |
return currency; |
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/v1/PriceTarget::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/v1/PriceTarget::equals → KILLED |
if (o == null || getClass() != o.getClass()) return false; |
74 | PriceTarget that = (PriceTarget) o; | |
75 |
2
1. equals : negated conditional → KILLED 2. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/stocks/v1/PriceTarget::equals → KILLED |
return Objects.equals(symbol, that.symbol) && |
76 |
1
1. equals : negated conditional → KILLED |
Objects.equals(updatedDate, that.updatedDate) && |
77 |
1
1. equals : negated conditional → KILLED |
Objects.equals(priceTargetAverage, that.priceTargetAverage) && |
78 |
1
1. equals : negated conditional → KILLED |
Objects.equals(priceTargetHigh, that.priceTargetHigh) && |
79 |
1
1. equals : negated conditional → KILLED |
Objects.equals(priceTargetLow, that.priceTargetLow) && |
80 |
1
1. equals : negated conditional → KILLED |
Objects.equals(numberOfAnalysts, that.numberOfAnalysts) && |
81 |
1
1. equals : negated conditional → KILLED |
Objects.equals(currency, that.currency); |
82 | } | |
83 | ||
84 | @Override | |
85 | public int hashCode() { | |
86 |
1
1. hashCode : replaced int return with 0 for pl/zankowski/iextrading4j/api/stocks/v1/PriceTarget::hashCode → KILLED |
return Objects.hash(symbol, updatedDate, priceTargetAverage, priceTargetHigh, priceTargetLow, |
87 | numberOfAnalysts, currency); | |
88 | } | |
89 | ||
90 | @Override | |
91 | public String toString() { | |
92 |
1
1. toString : replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/v1/PriceTarget::toString → KILLED |
return new StringJoiner(", ", PriceTarget.class.getSimpleName() + "[", "]") |
93 | .add("symbol='" + symbol + "'") | |
94 | .add("updatedDate=" + updatedDate) | |
95 | .add("priceTargetAverage=" + priceTargetAverage) | |
96 | .add("priceTargetHigh=" + priceTargetHigh) | |
97 | .add("priceTargetLow=" + priceTargetLow) | |
98 | .add("numberOfAnalysts=" + numberOfAnalysts) | |
99 | .add("currency='" + currency + "'") | |
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 |