| 1 | package pl.zankowski.iextrading4j.api.datapoint; | |
| 2 | ||
| 3 | import com.fasterxml.jackson.annotation.JsonCreator; | |
| 4 | import com.fasterxml.jackson.annotation.JsonFormat; | |
| 5 | import com.fasterxml.jackson.annotation.JsonProperty; | |
| 6 | import com.google.common.base.MoreObjects; | |
| 7 | import com.google.common.base.Objects; | |
| 8 | ||
| 9 | import java.io.Serializable; | |
| 10 | import java.math.BigDecimal; | |
| 11 | import java.time.LocalDateTime; | |
| 12 | ||
| 13 | public class TimeSeriesMetadata implements Serializable { | |
| 14 | ||
| 15 | private static final long serialVersionUID = -6089147392234388332L; | |
| 16 | ||
| 17 | private final String id; | |
| 18 | private final String description; | |
| 19 | private final TimeSeriesSchema schema; | |
| 20 | private final String weightKey; | |
| 21 | private final BigDecimal weight; | |
| 22 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |
| 23 | private final LocalDateTime created; | |
| 24 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |
| 25 | private final LocalDateTime lastUpdated; | |
| 26 | ||
| 27 | @JsonCreator | |
| 28 | public TimeSeriesMetadata( | |
| 29 | @JsonProperty("id") final String id, | |
| 30 | @JsonProperty("description") final String description, | |
| 31 | @JsonProperty("schema") final TimeSeriesSchema schema, | |
| 32 | @JsonProperty("weightKey") final String weightKey, | |
| 33 | @JsonProperty("weight") final BigDecimal weight, | |
| 34 | @JsonProperty("created") final LocalDateTime created, | |
| 35 | @JsonProperty("lastUpdated") final LocalDateTime lastUpdated) { | |
| 36 | this.id = id; | |
| 37 | this.description = description; | |
| 38 | this.schema = schema; | |
| 39 | this.weightKey = weightKey; | |
| 40 | this.weight = weight; | |
| 41 | this.created = created; | |
| 42 | this.lastUpdated = lastUpdated; | |
| 43 | } | |
| 44 | ||
| 45 | public String getId() { | |
| 46 |
1
1. getId : replaced return value with "" for pl/zankowski/iextrading4j/api/datapoint/TimeSeriesMetadata::getId → KILLED |
return id; |
| 47 | } | |
| 48 | ||
| 49 | public String getDescription() { | |
| 50 |
1
1. getDescription : replaced return value with "" for pl/zankowski/iextrading4j/api/datapoint/TimeSeriesMetadata::getDescription → KILLED |
return description; |
| 51 | } | |
| 52 | ||
| 53 | public TimeSeriesSchema getSchema() { | |
| 54 |
1
1. getSchema : replaced return value with null for pl/zankowski/iextrading4j/api/datapoint/TimeSeriesMetadata::getSchema → KILLED |
return schema; |
| 55 | } | |
| 56 | ||
| 57 | public String getWeightKey() { | |
| 58 |
1
1. getWeightKey : replaced return value with "" for pl/zankowski/iextrading4j/api/datapoint/TimeSeriesMetadata::getWeightKey → KILLED |
return weightKey; |
| 59 | } | |
| 60 | ||
| 61 | public BigDecimal getWeight() { | |
| 62 |
1
1. getWeight : replaced return value with null for pl/zankowski/iextrading4j/api/datapoint/TimeSeriesMetadata::getWeight → KILLED |
return weight; |
| 63 | } | |
| 64 | ||
| 65 | public LocalDateTime getCreated() { | |
| 66 |
1
1. getCreated : replaced return value with null for pl/zankowski/iextrading4j/api/datapoint/TimeSeriesMetadata::getCreated → KILLED |
return created; |
| 67 | } | |
| 68 | ||
| 69 | public LocalDateTime getLastUpdated() { | |
| 70 |
1
1. getLastUpdated : replaced return value with null for pl/zankowski/iextrading4j/api/datapoint/TimeSeriesMetadata::getLastUpdated → KILLED |
return lastUpdated; |
| 71 | } | |
| 72 | ||
| 73 | @Override | |
| 74 | public boolean equals(final Object o) { | |
| 75 |
1
1. equals : negated conditional → KILLED |
if (this == o) { |
| 76 |
1
1. equals : replaced boolean return with false for pl/zankowski/iextrading4j/api/datapoint/TimeSeriesMetadata::equals → KILLED |
return true; |
| 77 | } | |
| 78 |
2
1. equals : negated conditional → KILLED 2. equals : negated conditional → KILLED |
if (o == null || getClass() != o.getClass()) { |
| 79 |
1
1. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/datapoint/TimeSeriesMetadata::equals → KILLED |
return false; |
| 80 | } | |
| 81 | final TimeSeriesMetadata that = (TimeSeriesMetadata) o; | |
| 82 |
2
1. equals : negated conditional → KILLED 2. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/datapoint/TimeSeriesMetadata::equals → KILLED |
return Objects.equal(id, that.id) && |
| 83 |
1
1. equals : negated conditional → KILLED |
Objects.equal(description, that.description) && |
| 84 |
1
1. equals : negated conditional → KILLED |
Objects.equal(schema, that.schema) && |
| 85 |
1
1. equals : negated conditional → KILLED |
Objects.equal(weightKey, that.weightKey) && |
| 86 |
1
1. equals : negated conditional → KILLED |
Objects.equal(weight, that.weight) && |
| 87 |
1
1. equals : negated conditional → KILLED |
Objects.equal(created, that.created) && |
| 88 |
1
1. equals : negated conditional → KILLED |
Objects.equal(lastUpdated, that.lastUpdated); |
| 89 | } | |
| 90 | ||
| 91 | @Override | |
| 92 | public int hashCode() { | |
| 93 |
1
1. hashCode : replaced int return with 0 for pl/zankowski/iextrading4j/api/datapoint/TimeSeriesMetadata::hashCode → KILLED |
return Objects.hashCode(id, description, schema, weightKey, weight, created, lastUpdated); |
| 94 | } | |
| 95 | ||
| 96 | @Override | |
| 97 | public String toString() { | |
| 98 |
1
1. toString : replaced return value with "" for pl/zankowski/iextrading4j/api/datapoint/TimeSeriesMetadata::toString → KILLED |
return MoreObjects.toStringHelper(this) |
| 99 | .add("id", id) | |
| 100 | .add("description", description) | |
| 101 | .add("schema", schema) | |
| 102 | .add("weightKey", weightKey) | |
| 103 | .add("weight", weight) | |
| 104 | .add("created", created) | |
| 105 | .add("lastUpdated", lastUpdated) | |
| 106 | .toString(); | |
| 107 | } | |
| 108 | ||
| 109 | } | |
Mutations | ||
| 46 |
1.1 |
|
| 50 |
1.1 |
|
| 54 |
1.1 |
|
| 58 |
1.1 |
|
| 62 |
1.1 |
|
| 66 |
1.1 |
|
| 70 |
1.1 |
|
| 75 |
1.1 |
|
| 76 |
1.1 |
|
| 78 |
1.1 2.2 |
|
| 79 |
1.1 |
|
| 82 |
1.1 2.2 |
|
| 83 |
1.1 |
|
| 84 |
1.1 |
|
| 85 |
1.1 |
|
| 86 |
1.1 |
|
| 87 |
1.1 |
|
| 88 |
1.1 |
|
| 93 |
1.1 |
|
| 98 |
1.1 |