| 1 | package pl.zankowski.iextrading4j.api.marketdata; | |
| 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.io.Serializable; | |
| 9 | import java.math.BigDecimal; | |
| 10 | ||
| 11 | public class LastTrade implements Serializable { | |
| 12 | ||
| 13 | private static final long serialVersionUID = -2673418323510720203L; | |
| 14 | ||
| 15 | private final String symbol; | |
| 16 | private final BigDecimal price; | |
| 17 | private final BigDecimal size; | |
| 18 | private final Long time; | |
| 19 | ||
| 20 | @JsonCreator | |
| 21 | public LastTrade( | |
| 22 | @JsonProperty("symbol") final String symbol, | |
| 23 | @JsonProperty("price") final BigDecimal price, | |
| 24 | @JsonProperty("size") final BigDecimal size, | |
| 25 | @JsonProperty("time") final Long time) { | |
| 26 | this.symbol = symbol; | |
| 27 | this.price = price; | |
| 28 | this.size = size; | |
| 29 | this.time = time; | |
| 30 | } | |
| 31 | ||
| 32 | public String getSymbol() { | |
| 33 |
1
1. getSymbol : replaced return value with "" for pl/zankowski/iextrading4j/api/marketdata/LastTrade::getSymbol → KILLED |
return symbol; |
| 34 | } | |
| 35 | ||
| 36 | public BigDecimal getPrice() { | |
| 37 |
1
1. getPrice : replaced return value with null for pl/zankowski/iextrading4j/api/marketdata/LastTrade::getPrice → KILLED |
return price; |
| 38 | } | |
| 39 | ||
| 40 | public BigDecimal getSize() { | |
| 41 |
1
1. getSize : replaced return value with null for pl/zankowski/iextrading4j/api/marketdata/LastTrade::getSize → KILLED |
return size; |
| 42 | } | |
| 43 | ||
| 44 | public Long getTime() { | |
| 45 |
1
1. getTime : replaced Long return value with 0L for pl/zankowski/iextrading4j/api/marketdata/LastTrade::getTime → KILLED |
return time; |
| 46 | } | |
| 47 | ||
| 48 | @Override | |
| 49 | public boolean equals(Object o) { | |
| 50 |
2
1. equals : negated conditional → KILLED 2. equals : replaced boolean return with false for pl/zankowski/iextrading4j/api/marketdata/LastTrade::equals → KILLED |
if (this == o) return true; |
| 51 |
3
1. equals : negated conditional → KILLED 2. equals : negated conditional → KILLED 3. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/marketdata/LastTrade::equals → KILLED |
if (o == null || getClass() != o.getClass()) return false; |
| 52 | LastTrade lastTrade = (LastTrade) o; | |
| 53 |
2
1. equals : negated conditional → KILLED 2. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/marketdata/LastTrade::equals → KILLED |
return Objects.equal(symbol, lastTrade.symbol) && |
| 54 |
1
1. equals : negated conditional → KILLED |
Objects.equal(price, lastTrade.price) && |
| 55 |
1
1. equals : negated conditional → KILLED |
Objects.equal(size, lastTrade.size) && |
| 56 |
1
1. equals : negated conditional → KILLED |
Objects.equal(time, lastTrade.time); |
| 57 | } | |
| 58 | ||
| 59 | @Override | |
| 60 | public int hashCode() { | |
| 61 |
1
1. hashCode : replaced int return with 0 for pl/zankowski/iextrading4j/api/marketdata/LastTrade::hashCode → KILLED |
return Objects.hashCode(symbol, price, size, time); |
| 62 | } | |
| 63 | ||
| 64 | @Override | |
| 65 | public String toString() { | |
| 66 |
1
1. toString : replaced return value with "" for pl/zankowski/iextrading4j/api/marketdata/LastTrade::toString → KILLED |
return MoreObjects.toStringHelper(this) |
| 67 | .add("symbol", symbol) | |
| 68 | .add("price", price) | |
| 69 | .add("size", size) | |
| 70 | .add("time", time) | |
| 71 | .toString(); | |
| 72 | } | |
| 73 | } | |
Mutations | ||
| 33 |
1.1 |
|
| 37 |
1.1 |
|
| 41 |
1.1 |
|
| 45 |
1.1 |
|
| 50 |
1.1 2.2 |
|
| 51 |
1.1 2.2 3.3 |
|
| 53 |
1.1 2.2 |
|
| 54 |
1.1 |
|
| 55 |
1.1 |
|
| 56 |
1.1 |
|
| 61 |
1.1 |
|
| 66 |
1.1 |