| 1 | package pl.zankowski.iextrading4j.api.stocks.v1; | |
| 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 | import pl.zankowski.iextrading4j.api.stocks.Chart; | |
| 8 | ||
| 9 | import java.io.Serializable; | |
| 10 | import java.math.BigDecimal; | |
| 11 | import java.util.List; | |
| 12 | ||
| 13 | import static pl.zankowski.iextrading4j.api.util.ListUtil.immutableList; | |
| 14 | ||
| 15 | public class TechnicalIndicator implements Serializable { | |
| 16 | ||
| 17 | private static final long serialVersionUID = 8156047066786014613L; | |
| 18 | ||
| 19 | private final List<List<BigDecimal>> indicator; | |
| 20 | private final List<Chart> chart; | |
| 21 | ||
| 22 | @JsonCreator | |
| 23 | public TechnicalIndicator( | |
| 24 | @JsonProperty("indicator") final List<List<BigDecimal>> indicator, | |
| 25 | @JsonProperty("chart") final List<Chart> chart) { | |
| 26 | this.indicator = immutableList(indicator); | |
| 27 | this.chart = immutableList(chart); | |
| 28 | } | |
| 29 | ||
| 30 | public List<List<BigDecimal>> getIndicator() { | |
| 31 |
1
1. getIndicator : replaced return value with Collections.emptyList for pl/zankowski/iextrading4j/api/stocks/v1/TechnicalIndicator::getIndicator → KILLED |
return indicator; |
| 32 | } | |
| 33 | ||
| 34 | public List<Chart> getChart() { | |
| 35 |
1
1. getChart : replaced return value with Collections.emptyList for pl/zankowski/iextrading4j/api/stocks/v1/TechnicalIndicator::getChart → KILLED |
return chart; |
| 36 | } | |
| 37 | ||
| 38 | @Override | |
| 39 | public boolean equals(final Object o) { | |
| 40 |
1
1. equals : negated conditional → KILLED |
if (this == o) { |
| 41 |
1
1. equals : replaced boolean return with false for pl/zankowski/iextrading4j/api/stocks/v1/TechnicalIndicator::equals → KILLED |
return true; |
| 42 | } | |
| 43 |
2
1. equals : negated conditional → KILLED 2. equals : negated conditional → KILLED |
if (o == null || getClass() != o.getClass()) { |
| 44 |
1
1. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/stocks/v1/TechnicalIndicator::equals → KILLED |
return false; |
| 45 | } | |
| 46 | final TechnicalIndicator that = (TechnicalIndicator) o; | |
| 47 |
2
1. equals : negated conditional → KILLED 2. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/stocks/v1/TechnicalIndicator::equals → KILLED |
return Objects.equal(indicator, that.indicator) && |
| 48 |
1
1. equals : negated conditional → KILLED |
Objects.equal(chart, that.chart); |
| 49 | } | |
| 50 | ||
| 51 | @Override | |
| 52 | public int hashCode() { | |
| 53 |
1
1. hashCode : replaced int return with 0 for pl/zankowski/iextrading4j/api/stocks/v1/TechnicalIndicator::hashCode → KILLED |
return Objects.hashCode(indicator, chart); |
| 54 | } | |
| 55 | ||
| 56 | @Override | |
| 57 | public String toString() { | |
| 58 |
1
1. toString : replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/v1/TechnicalIndicator::toString → KILLED |
return MoreObjects.toStringHelper(this) |
| 59 | .add("indicator", indicator) | |
| 60 | .add("chart", chart) | |
| 61 | .toString(); | |
| 62 | } | |
| 63 | } | |
Mutations | ||
| 31 |
1.1 |
|
| 35 |
1.1 |
|
| 40 |
1.1 |
|
| 41 |
1.1 |
|
| 43 |
1.1 2.2 |
|
| 44 |
1.1 |
|
| 47 |
1.1 2.2 |
|
| 48 |
1.1 |
|
| 53 |
1.1 |
|
| 58 |
1.1 |