1 | package pl.zankowski.iextrading4j.api.datapoint; | |
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.OffsetDateTime; | |
11 | ||
12 | public class DataPoint implements Serializable { | |
13 | ||
14 | private static final long serialVersionUID = 1943500259622072479L; | |
15 | ||
16 | private final String key; | |
17 | private final BigDecimal weight; | |
18 | private final String description; | |
19 | private final OffsetDateTime lastUpdated; | |
20 | ||
21 | @JsonCreator | |
22 | public DataPoint( | |
23 | @JsonProperty("key") final String key, | |
24 | @JsonProperty("weight") final BigDecimal weight, | |
25 | @JsonProperty("description") final String description, | |
26 | @JsonProperty("lastUpdated") final OffsetDateTime lastUpdated) { | |
27 | this.key = key; | |
28 | this.weight = weight; | |
29 | this.description = description; | |
30 | this.lastUpdated = lastUpdated; | |
31 | } | |
32 | ||
33 | public String getKey() { | |
34 |
1
1. getKey : replaced return value with "" for pl/zankowski/iextrading4j/api/datapoint/DataPoint::getKey → KILLED |
return key; |
35 | } | |
36 | ||
37 | public BigDecimal getWeight() { | |
38 |
1
1. getWeight : replaced return value with null for pl/zankowski/iextrading4j/api/datapoint/DataPoint::getWeight → KILLED |
return weight; |
39 | } | |
40 | ||
41 | public String getDescription() { | |
42 |
1
1. getDescription : replaced return value with "" for pl/zankowski/iextrading4j/api/datapoint/DataPoint::getDescription → KILLED |
return description; |
43 | } | |
44 | ||
45 | public OffsetDateTime getLastUpdated() { | |
46 |
1
1. getLastUpdated : replaced return value with null for pl/zankowski/iextrading4j/api/datapoint/DataPoint::getLastUpdated → KILLED |
return lastUpdated; |
47 | } | |
48 | ||
49 | @Override | |
50 | public boolean equals(final Object o) { | |
51 |
1
1. equals : negated conditional → KILLED |
if (this == o) { |
52 |
1
1. equals : replaced boolean return with false for pl/zankowski/iextrading4j/api/datapoint/DataPoint::equals → KILLED |
return true; |
53 | } | |
54 |
2
1. equals : negated conditional → KILLED 2. equals : negated conditional → KILLED |
if (o == null || getClass() != o.getClass()) { |
55 |
1
1. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/datapoint/DataPoint::equals → KILLED |
return false; |
56 | } | |
57 | final DataPoint dataPoint = (DataPoint) o; | |
58 |
2
1. equals : negated conditional → KILLED 2. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/datapoint/DataPoint::equals → KILLED |
return Objects.equal(key, dataPoint.key) && |
59 |
1
1. equals : negated conditional → KILLED |
Objects.equal(weight, dataPoint.weight) && |
60 |
1
1. equals : negated conditional → KILLED |
Objects.equal(description, dataPoint.description) && |
61 |
1
1. equals : negated conditional → KILLED |
Objects.equal(lastUpdated, dataPoint.lastUpdated); |
62 | } | |
63 | ||
64 | @Override | |
65 | public int hashCode() { | |
66 |
1
1. hashCode : replaced int return with 0 for pl/zankowski/iextrading4j/api/datapoint/DataPoint::hashCode → KILLED |
return Objects.hashCode(key, weight, description, lastUpdated); |
67 | } | |
68 | ||
69 | @Override | |
70 | public String toString() { | |
71 |
1
1. toString : replaced return value with "" for pl/zankowski/iextrading4j/api/datapoint/DataPoint::toString → KILLED |
return MoreObjects.toStringHelper(this) |
72 | .add("key", key) | |
73 | .add("weight", weight) | |
74 | .add("description", description) | |
75 | .add("lastUpdated", lastUpdated) | |
76 | .toString(); | |
77 | } | |
78 | ||
79 | } | |
Mutations | ||
34 |
1.1 |
|
38 |
1.1 |
|
42 |
1.1 |
|
46 |
1.1 |
|
51 |
1.1 |
|
52 |
1.1 |
|
54 |
1.1 2.2 |
|
55 |
1.1 |
|
58 |
1.1 2.2 |
|
59 |
1.1 |
|
60 |
1.1 |
|
61 |
1.1 |
|
66 |
1.1 |
|
71 |
1.1 |