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