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