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.math.BigDecimal; | |
9 | ||
10 | public class CurrencyConversion extends CurrencyRate { | |
11 | ||
12 | private static final long serialVersionUID = 7375544334448807375L; | |
13 | ||
14 | private final BigDecimal amount; | |
15 | ||
16 | @JsonCreator | |
17 | public CurrencyConversion( | |
18 | @JsonProperty("symbol") final String symbol, | |
19 | @JsonProperty("rate") final BigDecimal rate, | |
20 | @JsonProperty("timestamp") final Long timestamp, | |
21 | @JsonProperty("amount") final BigDecimal amount, | |
22 | @JsonProperty("isDerived") final Boolean isDerived) { | |
23 | super(symbol, rate, timestamp, isDerived); | |
24 | this.amount = amount; | |
25 | } | |
26 | ||
27 | public BigDecimal getAmount() { | |
28 |
1
1. getAmount : replaced return value with null for pl/zankowski/iextrading4j/api/forex/CurrencyConversion::getAmount → KILLED |
return amount; |
29 | } | |
30 | ||
31 | @Override | |
32 | public boolean equals(final Object o) { | |
33 |
1
1. equals : negated conditional → NO_COVERAGE |
if (this == o) { |
34 |
1
1. equals : replaced boolean return with false for pl/zankowski/iextrading4j/api/forex/CurrencyConversion::equals → NO_COVERAGE |
return true; |
35 | } | |
36 |
2
1. equals : negated conditional → NO_COVERAGE 2. equals : negated conditional → NO_COVERAGE |
if (o == null || getClass() != o.getClass()) { |
37 |
1
1. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/forex/CurrencyConversion::equals → NO_COVERAGE |
return false; |
38 | } | |
39 |
1
1. equals : negated conditional → NO_COVERAGE |
if (!super.equals(o)) { |
40 |
1
1. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/forex/CurrencyConversion::equals → NO_COVERAGE |
return false; |
41 | } | |
42 | final CurrencyConversion that = (CurrencyConversion) o; | |
43 |
2
1. equals : replaced boolean return with false for pl/zankowski/iextrading4j/api/forex/CurrencyConversion::equals → NO_COVERAGE 2. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/forex/CurrencyConversion::equals → NO_COVERAGE |
return Objects.equal(amount, that.amount); |
44 | } | |
45 | ||
46 | @Override | |
47 | public int hashCode() { | |
48 |
1
1. hashCode : replaced int return with 0 for pl/zankowski/iextrading4j/api/forex/CurrencyConversion::hashCode → NO_COVERAGE |
return Objects.hashCode(super.hashCode(), amount); |
49 | } | |
50 | ||
51 | @Override | |
52 | public String toString() { | |
53 |
1
1. toString : replaced return value with "" for pl/zankowski/iextrading4j/api/forex/CurrencyConversion::toString → KILLED |
return MoreObjects.toStringHelper(this) |
54 | .add("amount", amount) | |
55 | .toString(); | |
56 | } | |
57 | ||
58 | } | |
Mutations | ||
28 |
1.1 |
|
33 |
1.1 |
|
34 |
1.1 |
|
36 |
1.1 2.2 |
|
37 |
1.1 |
|
39 |
1.1 |
|
40 |
1.1 |
|
43 |
1.1 2.2 |
|
48 |
1.1 |
|
53 |
1.1 |