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