| 1 | package pl.zankowski.iextrading4j.api.stocks; | |
| 2 | ||
| 3 | import com.fasterxml.jackson.annotation.JsonCreator; | |
| 4 | import com.fasterxml.jackson.annotation.JsonProperty; | |
| 5 | ||
| 6 | import java.io.Serializable; | |
| 7 | import java.math.BigDecimal; | |
| 8 | import java.util.Objects; | |
| 9 | import java.util.StringJoiner; | |
| 10 | ||
| 11 | public class SectorPerformance implements Serializable { | |
| 12 | ||
| 13 | private static final long serialVersionUID = 1840798428261698611L; | |
| 14 | ||
| 15 | private final String symbol; | |
| 16 | private final String type; | |
| 17 | private final String name; | |
| 18 | private final BigDecimal performance; | |
| 19 | private final Long lastUpdated; | |
| 20 | ||
| 21 | @JsonCreator | |
| 22 | public SectorPerformance( | |
| 23 | @JsonProperty("symbol") final String symbol, | |
| 24 | @JsonProperty("type") final String type, | |
| 25 | @JsonProperty("name") final String name, | |
| 26 | @JsonProperty("performance") final BigDecimal performance, | |
| 27 | @JsonProperty("lastUpdated") final Long lastUpdated) { | |
| 28 | this.symbol = symbol; | |
| 29 | this.type = type; | |
| 30 | this.name = name; | |
| 31 | this.performance = performance; | |
| 32 | this.lastUpdated = lastUpdated; | |
| 33 | } | |
| 34 | ||
| 35 | public String getSymbol() { | |
| 36 |
1
1. getSymbol : replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/SectorPerformance::getSymbol → KILLED |
return symbol; |
| 37 | } | |
| 38 | ||
| 39 | public String getType() { | |
| 40 |
1
1. getType : replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/SectorPerformance::getType → KILLED |
return type; |
| 41 | } | |
| 42 | ||
| 43 | public String getName() { | |
| 44 |
1
1. getName : replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/SectorPerformance::getName → KILLED |
return name; |
| 45 | } | |
| 46 | ||
| 47 | public BigDecimal getPerformance() { | |
| 48 |
1
1. getPerformance : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/SectorPerformance::getPerformance → KILLED |
return performance; |
| 49 | } | |
| 50 | ||
| 51 | public Long getLastUpdated() { | |
| 52 |
1
1. getLastUpdated : replaced Long return value with 0L for pl/zankowski/iextrading4j/api/stocks/SectorPerformance::getLastUpdated → KILLED |
return lastUpdated; |
| 53 | } | |
| 54 | ||
| 55 | @Override | |
| 56 | public boolean equals(final Object o) { | |
| 57 |
1
1. equals : negated conditional → KILLED |
if (this == o) { |
| 58 |
1
1. equals : replaced boolean return with false for pl/zankowski/iextrading4j/api/stocks/SectorPerformance::equals → KILLED |
return true; |
| 59 | } | |
| 60 |
2
1. equals : negated conditional → KILLED 2. equals : negated conditional → KILLED |
if (o == null || getClass() != o.getClass()) { |
| 61 |
1
1. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/stocks/SectorPerformance::equals → KILLED |
return false; |
| 62 | } | |
| 63 | final SectorPerformance that = (SectorPerformance) o; | |
| 64 |
2
1. equals : negated conditional → KILLED 2. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/stocks/SectorPerformance::equals → KILLED |
return Objects.equals(symbol, that.symbol) && |
| 65 |
1
1. equals : negated conditional → KILLED |
Objects.equals(type, that.type) && |
| 66 |
1
1. equals : negated conditional → KILLED |
Objects.equals(name, that.name) && |
| 67 |
1
1. equals : negated conditional → KILLED |
Objects.equals(performance, that.performance) && |
| 68 |
1
1. equals : negated conditional → KILLED |
Objects.equals(lastUpdated, that.lastUpdated); |
| 69 | } | |
| 70 | ||
| 71 | @Override | |
| 72 | public int hashCode() { | |
| 73 |
1
1. hashCode : replaced int return with 0 for pl/zankowski/iextrading4j/api/stocks/SectorPerformance::hashCode → KILLED |
return Objects.hash(symbol, type, name, performance, lastUpdated); |
| 74 | } | |
| 75 | ||
| 76 | @Override | |
| 77 | public String toString() { | |
| 78 |
1
1. toString : replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/SectorPerformance::toString → KILLED |
return new StringJoiner(", ", SectorPerformance.class.getSimpleName() + "[", "]") |
| 79 | .add("symbol='" + symbol + "'") | |
| 80 | .add("type='" + type + "'") | |
| 81 | .add("name='" + name + "'") | |
| 82 | .add("performance=" + performance) | |
| 83 | .add("lastUpdated=" + lastUpdated) | |
| 84 | .toString(); | |
| 85 | } | |
| 86 | } | |
Mutations | ||
| 36 |
1.1 |
|
| 40 |
1.1 |
|
| 44 |
1.1 |
|
| 48 |
1.1 |
|
| 52 |
1.1 |
|
| 57 |
1.1 |
|
| 58 |
1.1 |
|
| 60 |
1.1 2.2 |
|
| 61 |
1.1 |
|
| 64 |
1.1 2.2 |
|
| 65 |
1.1 |
|
| 66 |
1.1 |
|
| 67 |
1.1 |
|
| 68 |
1.1 |
|
| 73 |
1.1 |
|
| 78 |
1.1 |