| 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.math.BigDecimal; | |
| 9 | ||
| 10 | public class Trade implements DeepResult { | |
| 11 | ||
| 12 | private static final long serialVersionUID = -1447468079664257972L; | |
| 13 | ||
| 14 | private final BigDecimal price; | |
| 15 | private final BigDecimal size; | |
| 16 | private final Long tradeId; | |
| 17 | private final Boolean isISO; | |
| 18 | private final Boolean isOddLot; | |
| 19 | private final Boolean isOutsideRegularHours; | |
| 20 | private final Boolean isSinglePriceCross; | |
| 21 | private final Boolean isTradeThroughExempt; | |
| 22 | private final Long timestamp; | |
| 23 | ||
| 24 | @JsonCreator | |
| 25 | public Trade( | |
| 26 | @JsonProperty("price") final BigDecimal price, | |
| 27 | @JsonProperty("size") final BigDecimal size, | |
| 28 | @JsonProperty("tradeId") final Long tradeId, | |
| 29 | @JsonProperty("isISO") final Boolean isISO, | |
| 30 | @JsonProperty("isOddLot") final Boolean isOddLot, | |
| 31 | @JsonProperty("isOutsideRegularHours") final Boolean isOutsideRegularHours, | |
| 32 | @JsonProperty("isSinglePriceCross") final Boolean isSinglePriceCross, | |
| 33 | @JsonProperty("isTradeThroughExempt") final Boolean isTradeThroughExempt, | |
| 34 | @JsonProperty("timestamp") final Long timestamp) { | |
| 35 | this.price = price; | |
| 36 | this.size = size; | |
| 37 | this.tradeId = tradeId; | |
| 38 | this.isISO = isISO; | |
| 39 | this.isOddLot = isOddLot; | |
| 40 | this.isOutsideRegularHours = isOutsideRegularHours; | |
| 41 | this.isSinglePriceCross = isSinglePriceCross; | |
| 42 | this.isTradeThroughExempt = isTradeThroughExempt; | |
| 43 | this.timestamp = timestamp; | |
| 44 | } | |
| 45 | ||
| 46 | public BigDecimal getPrice() { | |
| 47 |
1
1. getPrice : replaced return value with null for pl/zankowski/iextrading4j/api/marketdata/Trade::getPrice → KILLED |
return price; |
| 48 | } | |
| 49 | ||
| 50 | public BigDecimal getSize() { | |
| 51 |
1
1. getSize : replaced return value with null for pl/zankowski/iextrading4j/api/marketdata/Trade::getSize → KILLED |
return size; |
| 52 | } | |
| 53 | ||
| 54 | public Long getTradeId() { | |
| 55 |
1
1. getTradeId : replaced Long return value with 0L for pl/zankowski/iextrading4j/api/marketdata/Trade::getTradeId → KILLED |
return tradeId; |
| 56 | } | |
| 57 | ||
| 58 | @JsonProperty("isISO") | |
| 59 | public Boolean isISO() { | |
| 60 |
2
1. isISO : replaced Boolean return with True for pl/zankowski/iextrading4j/api/marketdata/Trade::isISO → SURVIVED 2. isISO : replaced Boolean return with False for pl/zankowski/iextrading4j/api/marketdata/Trade::isISO → KILLED |
return isISO; |
| 61 | } | |
| 62 | ||
| 63 | @JsonProperty("isOddLot") | |
| 64 | public Boolean isOddLot() { | |
| 65 |
2
1. isOddLot : replaced Boolean return with False for pl/zankowski/iextrading4j/api/marketdata/Trade::isOddLot → SURVIVED 2. isOddLot : replaced Boolean return with True for pl/zankowski/iextrading4j/api/marketdata/Trade::isOddLot → KILLED |
return isOddLot; |
| 66 | } | |
| 67 | ||
| 68 | @JsonProperty("isOutsideRegularHours") | |
| 69 | public Boolean isOutsideRegularHours() { | |
| 70 |
2
1. isOutsideRegularHours : replaced Boolean return with True for pl/zankowski/iextrading4j/api/marketdata/Trade::isOutsideRegularHours → SURVIVED 2. isOutsideRegularHours : replaced Boolean return with False for pl/zankowski/iextrading4j/api/marketdata/Trade::isOutsideRegularHours → KILLED |
return isOutsideRegularHours; |
| 71 | } | |
| 72 | ||
| 73 | @JsonProperty("isSinglePriceCross") | |
| 74 | public Boolean isSinglePriceCross() { | |
| 75 |
2
1. isSinglePriceCross : replaced Boolean return with False for pl/zankowski/iextrading4j/api/marketdata/Trade::isSinglePriceCross → SURVIVED 2. isSinglePriceCross : replaced Boolean return with True for pl/zankowski/iextrading4j/api/marketdata/Trade::isSinglePriceCross → KILLED |
return isSinglePriceCross; |
| 76 | } | |
| 77 | ||
| 78 | @JsonProperty("isTradeThroughExempt") | |
| 79 | public Boolean isTradeThroughExempt() { | |
| 80 |
2
1. isTradeThroughExempt : replaced Boolean return with True for pl/zankowski/iextrading4j/api/marketdata/Trade::isTradeThroughExempt → SURVIVED 2. isTradeThroughExempt : replaced Boolean return with False for pl/zankowski/iextrading4j/api/marketdata/Trade::isTradeThroughExempt → KILLED |
return isTradeThroughExempt; |
| 81 | } | |
| 82 | ||
| 83 | public Long getTimestamp() { | |
| 84 |
1
1. getTimestamp : replaced Long return value with 0L for pl/zankowski/iextrading4j/api/marketdata/Trade::getTimestamp → KILLED |
return timestamp; |
| 85 | } | |
| 86 | ||
| 87 | @Override | |
| 88 | public boolean equals(Object o) { | |
| 89 |
2
1. equals : negated conditional → KILLED 2. equals : replaced boolean return with false for pl/zankowski/iextrading4j/api/marketdata/Trade::equals → KILLED |
if (this == o) return true; |
| 90 |
3
1. equals : negated conditional → KILLED 2. equals : negated conditional → KILLED 3. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/marketdata/Trade::equals → KILLED |
if (o == null || getClass() != o.getClass()) return false; |
| 91 | Trade trade = (Trade) o; | |
| 92 |
2
1. equals : negated conditional → KILLED 2. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/marketdata/Trade::equals → KILLED |
return Objects.equal(price, trade.price) && |
| 93 |
1
1. equals : negated conditional → KILLED |
Objects.equal(size, trade.size) && |
| 94 |
1
1. equals : negated conditional → KILLED |
Objects.equal(tradeId, trade.tradeId) && |
| 95 |
1
1. equals : negated conditional → KILLED |
Objects.equal(isISO, trade.isISO) && |
| 96 |
1
1. equals : negated conditional → KILLED |
Objects.equal(isOddLot, trade.isOddLot) && |
| 97 |
1
1. equals : negated conditional → KILLED |
Objects.equal(isOutsideRegularHours, trade.isOutsideRegularHours) && |
| 98 |
1
1. equals : negated conditional → KILLED |
Objects.equal(isSinglePriceCross, trade.isSinglePriceCross) && |
| 99 |
1
1. equals : negated conditional → KILLED |
Objects.equal(isTradeThroughExempt, trade.isTradeThroughExempt) && |
| 100 |
1
1. equals : negated conditional → KILLED |
Objects.equal(timestamp, trade.timestamp); |
| 101 | } | |
| 102 | ||
| 103 | @Override | |
| 104 | public int hashCode() { | |
| 105 |
1
1. hashCode : replaced int return with 0 for pl/zankowski/iextrading4j/api/marketdata/Trade::hashCode → KILLED |
return Objects.hashCode(price, size, tradeId, isISO, isOddLot, isOutsideRegularHours, |
| 106 | isSinglePriceCross, isTradeThroughExempt, timestamp); | |
| 107 | } | |
| 108 | ||
| 109 | @Override | |
| 110 | public String toString() { | |
| 111 |
1
1. toString : replaced return value with "" for pl/zankowski/iextrading4j/api/marketdata/Trade::toString → KILLED |
return MoreObjects.toStringHelper(this) |
| 112 | .add("price", price) | |
| 113 | .add("size", size) | |
| 114 | .add("tradeId", tradeId) | |
| 115 | .add("isISO", isISO) | |
| 116 | .add("isOddLot", isOddLot) | |
| 117 | .add("isOutsideRegularHours", isOutsideRegularHours) | |
| 118 | .add("isSinglePriceCross", isSinglePriceCross) | |
| 119 | .add("isTradeThroughExempt", isTradeThroughExempt) | |
| 120 | .add("timestamp", timestamp) | |
| 121 | .toString(); | |
| 122 | } | |
| 123 | } | |
Mutations | ||
| 47 |
1.1 |
|
| 51 |
1.1 |
|
| 55 |
1.1 |
|
| 60 |
1.1 2.2 |
|
| 65 |
1.1 2.2 |
|
| 70 |
1.1 2.2 |
|
| 75 |
1.1 2.2 |
|
| 80 |
1.1 2.2 |
|
| 84 |
1.1 |
|
| 89 |
1.1 2.2 |
|
| 90 |
1.1 2.2 3.3 |
|
| 92 |
1.1 2.2 |
|
| 93 |
1.1 |
|
| 94 |
1.1 |
|
| 95 |
1.1 |
|
| 96 |
1.1 |
|
| 97 |
1.1 |
|
| 98 |
1.1 |
|
| 99 |
1.1 |
|
| 100 |
1.1 |
|
| 105 |
1.1 |
|
| 111 |
1.1 |