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.time.OffsetDateTime; | |
10 | ||
11 | public class News implements Serializable { | |
12 | ||
13 | private static final long serialVersionUID = -5968583762112742513L; | |
14 | ||
15 | private final OffsetDateTime datetime; | |
16 | private final String headline; | |
17 | private final String source; | |
18 | private final String url; | |
19 | private final String summary; | |
20 | private final String related; | |
21 | private final String image; | |
22 | ||
23 | @JsonCreator | |
24 | public News( | |
25 | @JsonProperty("datetime") final OffsetDateTime datetime, | |
26 | @JsonProperty("headline") final String headline, | |
27 | @JsonProperty("source") final String source, | |
28 | @JsonProperty("url") final String url, | |
29 | @JsonProperty("summary") final String summary, | |
30 | @JsonProperty("related") final String related, | |
31 | @JsonProperty("image") final String image) { | |
32 | this.datetime = datetime; | |
33 | this.headline = headline; | |
34 | this.source = source; | |
35 | this.url = url; | |
36 | this.summary = summary; | |
37 | this.related = related; | |
38 | this.image = image; | |
39 | } | |
40 | ||
41 | public OffsetDateTime getDatetime() { | |
42 |
1
1. getDatetime : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/News::getDatetime → KILLED |
return datetime; |
43 | } | |
44 | ||
45 | public String getHeadline() { | |
46 |
1
1. getHeadline : replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/News::getHeadline → KILLED |
return headline; |
47 | } | |
48 | ||
49 | public String getSource() { | |
50 |
1
1. getSource : replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/News::getSource → KILLED |
return source; |
51 | } | |
52 | ||
53 | public String getUrl() { | |
54 |
1
1. getUrl : replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/News::getUrl → KILLED |
return url; |
55 | } | |
56 | ||
57 | public String getSummary() { | |
58 |
1
1. getSummary : replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/News::getSummary → KILLED |
return summary; |
59 | } | |
60 | ||
61 | public String getRelated() { | |
62 |
1
1. getRelated : replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/News::getRelated → KILLED |
return related; |
63 | } | |
64 | ||
65 | public String getImage() { | |
66 |
1
1. getImage : replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/News::getImage → KILLED |
return image; |
67 | } | |
68 | ||
69 | @Override | |
70 | public boolean equals(Object o) { | |
71 |
2
1. equals : negated conditional → KILLED 2. equals : replaced boolean return with false for pl/zankowski/iextrading4j/api/stocks/News::equals → KILLED |
if (this == o) return true; |
72 |
3
1. equals : negated conditional → KILLED 2. equals : negated conditional → KILLED 3. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/stocks/News::equals → KILLED |
if (o == null || getClass() != o.getClass()) return false; |
73 | News news = (News) o; | |
74 |
2
1. equals : negated conditional → KILLED 2. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/stocks/News::equals → KILLED |
return Objects.equal(datetime, news.datetime) && |
75 |
1
1. equals : negated conditional → KILLED |
Objects.equal(headline, news.headline) && |
76 |
1
1. equals : negated conditional → KILLED |
Objects.equal(source, news.source) && |
77 |
1
1. equals : negated conditional → KILLED |
Objects.equal(url, news.url) && |
78 |
1
1. equals : negated conditional → KILLED |
Objects.equal(summary, news.summary) && |
79 |
1
1. equals : negated conditional → KILLED |
Objects.equal(related, news.related) && |
80 |
1
1. equals : negated conditional → KILLED |
Objects.equal(image, news.image); |
81 | } | |
82 | ||
83 | @Override | |
84 | public int hashCode() { | |
85 |
1
1. hashCode : replaced int return with 0 for pl/zankowski/iextrading4j/api/stocks/News::hashCode → KILLED |
return Objects.hashCode(datetime, headline, source, url, summary, related, image); |
86 | } | |
87 | ||
88 | @Override | |
89 | public String toString() { | |
90 |
1
1. toString : replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/News::toString → KILLED |
return MoreObjects.toStringHelper(this) |
91 | .add("datetime", datetime) | |
92 | .add("headline", headline) | |
93 | .add("source", source) | |
94 | .add("url", url) | |
95 | .add("summary", summary) | |
96 | .add("related", related) | |
97 | .add("image", image) | |
98 | .toString(); | |
99 | } | |
100 | } | |
Mutations | ||
42 |
1.1 |
|
46 |
1.1 |
|
50 |
1.1 |
|
54 |
1.1 |
|
58 |
1.1 |
|
62 |
1.1 |
|
66 |
1.1 |
|
71 |
1.1 2.2 |
|
72 |
1.1 2.2 3.3 |
|
74 |
1.1 2.2 |
|
75 |
1.1 |
|
76 |
1.1 |
|
77 |
1.1 |
|
78 |
1.1 |
|
79 |
1.1 |
|
80 |
1.1 |
|
85 |
1.1 |
|
90 |
1.1 |