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