| 1 | package pl.zankowski.iextrading4j.api.stocks; | |
| 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 TodayEarning extends Earning { | |
| 12 | ||
| 13 | private static final long serialVersionUID = -4956454242048079697L; | |
| 14 | ||
| 15 | private final String symbol; | |
| 16 | private final Quote quote; | |
| 17 | private final String headline; | |
| 18 | private final LocalDate reportDate; | |
| 19 | ||
| 20 | @JsonCreator | |
| 21 | public TodayEarning( | |
| 22 | @JsonProperty("actualEPS") final BigDecimal actualEPS, | |
| 23 | @JsonProperty("consensusEPS") final BigDecimal consensusEPS, | |
| 24 | @JsonProperty("estimatedEPS") final BigDecimal estimatedEPS, | |
| 25 | @JsonProperty("announceTime") final String announceTime, | |
| 26 | @JsonProperty("numberOfEstimates") final BigDecimal numberOfEstimates, | |
| 27 | @JsonProperty("EPSSurpriseDollar") final BigDecimal EPSSurpriseDollar, | |
| 28 | @JsonProperty("EPSReportDate") final LocalDate EPSReportDate, | |
| 29 | @JsonProperty("fiscalPeriod") final String fiscalPeriod, | |
| 30 | @JsonProperty("fiscalEndDate") final LocalDate fiscalEndDate, | |
| 31 | @JsonProperty("yearAgo") final BigDecimal yearAgo, | |
| 32 | @JsonProperty("yearAgoChangePercent") final BigDecimal yearAgoChangePercent, | |
| 33 | @JsonProperty("symbol") final String symbol, | |
| 34 | @JsonProperty("quote") final Quote quote, | |
| 35 | @JsonProperty("headline") final String headline, | |
| 36 | @JsonProperty("reportDate") final LocalDate reportDate, | |
| 37 | @JsonProperty("currency") final String currency) { | |
| 38 | super(actualEPS, consensusEPS, estimatedEPS, announceTime, numberOfEstimates, EPSSurpriseDollar, EPSReportDate, | |
| 39 | fiscalPeriod, fiscalEndDate, yearAgo, yearAgoChangePercent, currency); | |
| 40 | this.symbol = symbol; | |
| 41 | this.quote = quote; | |
| 42 | this.headline = headline; | |
| 43 | this.reportDate = reportDate; | |
| 44 | } | |
| 45 | ||
| 46 | public String getSymbol() { | |
| 47 |
1
1. getSymbol : replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/TodayEarning::getSymbol → KILLED |
return symbol; |
| 48 | } | |
| 49 | ||
| 50 | public Quote getQuote() { | |
| 51 |
1
1. getQuote : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/TodayEarning::getQuote → KILLED |
return quote; |
| 52 | } | |
| 53 | ||
| 54 | public String getHeadline() { | |
| 55 |
1
1. getHeadline : replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/TodayEarning::getHeadline → KILLED |
return headline; |
| 56 | } | |
| 57 | ||
| 58 | public LocalDate getReportDate() { | |
| 59 |
1
1. getReportDate : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/TodayEarning::getReportDate → KILLED |
return reportDate; |
| 60 | } | |
| 61 | ||
| 62 | @Override | |
| 63 | public boolean equals(final Object o) { | |
| 64 |
2
1. equals : negated conditional → KILLED 2. equals : replaced boolean return with false for pl/zankowski/iextrading4j/api/stocks/TodayEarning::equals → KILLED |
if (this == o) return true; |
| 65 |
3
1. equals : negated conditional → KILLED 2. equals : negated conditional → KILLED 3. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/stocks/TodayEarning::equals → KILLED |
if (o == null || getClass() != o.getClass()) return false; |
| 66 |
2
1. equals : negated conditional → KILLED 2. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/stocks/TodayEarning::equals → KILLED |
if (!super.equals(o)) return false; |
| 67 | final TodayEarning that = (TodayEarning) o; | |
| 68 |
2
1. equals : negated conditional → KILLED 2. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/stocks/TodayEarning::equals → KILLED |
return Objects.equal(symbol, that.symbol) && |
| 69 |
1
1. equals : negated conditional → KILLED |
Objects.equal(quote, that.quote) && |
| 70 |
1
1. equals : negated conditional → KILLED |
Objects.equal(headline, that.headline) && |
| 71 |
1
1. equals : negated conditional → KILLED |
Objects.equal(reportDate, that.reportDate); |
| 72 | } | |
| 73 | ||
| 74 | @Override | |
| 75 | public int hashCode() { | |
| 76 |
1
1. hashCode : replaced int return with 0 for pl/zankowski/iextrading4j/api/stocks/TodayEarning::hashCode → KILLED |
return Objects.hashCode(super.hashCode(), symbol, quote, headline, reportDate); |
| 77 | } | |
| 78 | ||
| 79 | @Override | |
| 80 | public String toString() { | |
| 81 |
1
1. toString : replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/TodayEarning::toString → KILLED |
return MoreObjects.toStringHelper(this) |
| 82 | .add("symbol", symbol) | |
| 83 | .add("quote", quote) | |
| 84 | .add("headline", headline) | |
| 85 | .add("reportDate", reportDate) | |
| 86 | .toString(); | |
| 87 | } | |
| 88 | ||
| 89 | } | |
Mutations | ||
| 47 |
1.1 |
|
| 51 |
1.1 |
|
| 55 |
1.1 |
|
| 59 |
1.1 |
|
| 64 |
1.1 2.2 |
|
| 65 |
1.1 2.2 3.3 |
|
| 66 |
1.1 2.2 |
|
| 68 |
1.1 2.2 |
|
| 69 |
1.1 |
|
| 70 |
1.1 |
|
| 71 |
1.1 |
|
| 76 |
1.1 |
|
| 81 |
1.1 |