1 | package pl.zankowski.iextrading4j.api.marketdata; | |
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 | ||
11 | public class OfficialPrice implements Serializable { | |
12 | ||
13 | private static final long serialVersionUID = 4230013598683992993L; | |
14 | ||
15 | private final PriceType priceType; | |
16 | private final BigDecimal price; | |
17 | private final Long timestamp; | |
18 | ||
19 | @JsonCreator | |
20 | public OfficialPrice( | |
21 | @JsonProperty("priceType") final PriceType priceType, | |
22 | @JsonProperty("price") final BigDecimal price, | |
23 | @JsonProperty("timestamp") final Long timestamp) { | |
24 | this.priceType = priceType; | |
25 | this.price = price; | |
26 | this.timestamp = timestamp; | |
27 | } | |
28 | ||
29 | public PriceType getPriceType() { | |
30 |
1
1. getPriceType : replaced return value with null for pl/zankowski/iextrading4j/api/marketdata/OfficialPrice::getPriceType → KILLED |
return priceType; |
31 | } | |
32 | ||
33 | public BigDecimal getPrice() { | |
34 |
1
1. getPrice : replaced return value with null for pl/zankowski/iextrading4j/api/marketdata/OfficialPrice::getPrice → KILLED |
return price; |
35 | } | |
36 | ||
37 | public Long getTimestamp() { | |
38 |
1
1. getTimestamp : replaced Long return value with 0L for pl/zankowski/iextrading4j/api/marketdata/OfficialPrice::getTimestamp → KILLED |
return timestamp; |
39 | } | |
40 | ||
41 | @Override | |
42 | public boolean equals(final Object o) { | |
43 |
2
1. equals : negated conditional → KILLED 2. equals : replaced boolean return with false for pl/zankowski/iextrading4j/api/marketdata/OfficialPrice::equals → KILLED |
if (this == o) return true; |
44 |
3
1. equals : negated conditional → KILLED 2. equals : negated conditional → KILLED 3. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/marketdata/OfficialPrice::equals → KILLED |
if (o == null || getClass() != o.getClass()) return false; |
45 | final OfficialPrice that = (OfficialPrice) o; | |
46 |
2
1. equals : negated conditional → KILLED 2. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/marketdata/OfficialPrice::equals → KILLED |
return priceType == that.priceType && |
47 |
1
1. equals : negated conditional → KILLED |
Objects.equal(price, that.price) && |
48 |
1
1. equals : negated conditional → KILLED |
Objects.equal(timestamp, that.timestamp); |
49 | } | |
50 | ||
51 | @Override | |
52 | public int hashCode() { | |
53 |
1
1. hashCode : replaced int return with 0 for pl/zankowski/iextrading4j/api/marketdata/OfficialPrice::hashCode → KILLED |
return Objects.hashCode(priceType, price, timestamp); |
54 | } | |
55 | ||
56 | @Override | |
57 | public String toString() { | |
58 |
1
1. toString : replaced return value with "" for pl/zankowski/iextrading4j/api/marketdata/OfficialPrice::toString → KILLED |
return MoreObjects.toStringHelper(this) |
59 | .add("priceType", priceType) | |
60 | .add("price", price) | |
61 | .add("timestamp", timestamp) | |
62 | .toString(); | |
63 | } | |
64 | } | |
Mutations | ||
30 |
1.1 |
|
34 |
1.1 |
|
38 |
1.1 |
|
43 |
1.1 2.2 |
|
44 |
1.1 2.2 3.3 |
|
46 |
1.1 2.2 |
|
47 |
1.1 |
|
48 |
1.1 |
|
53 |
1.1 |
|
58 |
1.1 |