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.util.List; | |
10 | ||
11 | import static pl.zankowski.iextrading4j.api.util.ListUtil.immutableList; | |
12 | ||
13 | public class TodayEarnings implements Serializable { | |
14 | ||
15 | private static final long serialVersionUID = -66409416779499106L; | |
16 | ||
17 | private final List<TodayEarning> bto; | |
18 | private final List<TodayEarning> amc; | |
19 | private final List<TodayEarning> other; | |
20 | ||
21 | @JsonCreator | |
22 | public TodayEarnings( | |
23 | @JsonProperty("bto") final List<TodayEarning> bto, | |
24 | @JsonProperty("amc") final List<TodayEarning> amc, | |
25 | @JsonProperty("other") final List<TodayEarning> other) { | |
26 | this.bto = immutableList(bto); | |
27 | this.amc = immutableList(amc); | |
28 | this.other = immutableList(other); | |
29 | } | |
30 | ||
31 | public List<TodayEarning> getBto() { | |
32 |
1
1. getBto : replaced return value with Collections.emptyList for pl/zankowski/iextrading4j/api/stocks/TodayEarnings::getBto → KILLED |
return bto; |
33 | } | |
34 | ||
35 | public List<TodayEarning> getAmc() { | |
36 |
1
1. getAmc : replaced return value with Collections.emptyList for pl/zankowski/iextrading4j/api/stocks/TodayEarnings::getAmc → KILLED |
return amc; |
37 | } | |
38 | ||
39 | public List<TodayEarning> getOther() { | |
40 |
1
1. getOther : replaced return value with Collections.emptyList for pl/zankowski/iextrading4j/api/stocks/TodayEarnings::getOther → KILLED |
return other; |
41 | } | |
42 | ||
43 | @Override | |
44 | public boolean equals(final Object o) { | |
45 |
2
1. equals : negated conditional → KILLED 2. equals : replaced boolean return with false for pl/zankowski/iextrading4j/api/stocks/TodayEarnings::equals → KILLED |
if (this == o) return true; |
46 |
3
1. equals : negated conditional → KILLED 2. equals : negated conditional → KILLED 3. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/stocks/TodayEarnings::equals → KILLED |
if (o == null || getClass() != o.getClass()) return false; |
47 | final TodayEarnings that = (TodayEarnings) o; | |
48 |
2
1. equals : negated conditional → KILLED 2. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/stocks/TodayEarnings::equals → KILLED |
return Objects.equal(bto, that.bto) && |
49 |
1
1. equals : negated conditional → KILLED |
Objects.equal(amc, that.amc) && |
50 |
1
1. equals : negated conditional → KILLED |
Objects.equal(other, that.other); |
51 | } | |
52 | ||
53 | @Override | |
54 | public int hashCode() { | |
55 |
1
1. hashCode : replaced int return with 0 for pl/zankowski/iextrading4j/api/stocks/TodayEarnings::hashCode → KILLED |
return Objects.hashCode(bto, amc, other); |
56 | } | |
57 | ||
58 | @Override | |
59 | public String toString() { | |
60 |
1
1. toString : replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/TodayEarnings::toString → KILLED |
return MoreObjects.toStringHelper(this) |
61 | .add("bto", bto) | |
62 | .add("amc", amc) | |
63 | .add("other", other) | |
64 | .toString(); | |
65 | } | |
66 | ||
67 | } | |
Mutations | ||
32 |
1.1 |
|
36 |
1.1 |
|
40 |
1.1 |
|
45 |
1.1 2.2 |
|
46 |
1.1 2.2 3.3 |
|
48 |
1.1 2.2 |
|
49 |
1.1 |
|
50 |
1.1 |
|
55 |
1.1 |
|
60 |
1.1 |