1 | package pl.zankowski.iextrading4j.api.alternative; | |
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.LocalTime; | |
12 | ||
13 | public class Sentiment implements Serializable { | |
14 | ||
15 | private static final long serialVersionUID = -4716020002316419582L; | |
16 | ||
17 | private final BigDecimal sentiment; | |
18 | private final BigDecimal totalScores; | |
19 | private final BigDecimal positive; | |
20 | private final BigDecimal negative; | |
21 | @JsonFormat(pattern = "HHmm") | |
22 | private final LocalTime minute; | |
23 | ||
24 | @JsonCreator | |
25 | public Sentiment( | |
26 | @JsonProperty("sentiment") final BigDecimal sentiment, | |
27 | @JsonProperty("totalScores") final BigDecimal totalScores, | |
28 | @JsonProperty("positive") final BigDecimal positive, | |
29 | @JsonProperty("negative") final BigDecimal negative, | |
30 | @JsonProperty("minute") final LocalTime minute) { | |
31 | this.sentiment = sentiment; | |
32 | this.totalScores = totalScores; | |
33 | this.positive = positive; | |
34 | this.negative = negative; | |
35 | this.minute = minute; | |
36 | } | |
37 | ||
38 | public BigDecimal getSentiment() { | |
39 |
1
1. getSentiment : replaced return value with null for pl/zankowski/iextrading4j/api/alternative/Sentiment::getSentiment → KILLED |
return sentiment; |
40 | } | |
41 | ||
42 | public BigDecimal getTotalScores() { | |
43 |
1
1. getTotalScores : replaced return value with null for pl/zankowski/iextrading4j/api/alternative/Sentiment::getTotalScores → KILLED |
return totalScores; |
44 | } | |
45 | ||
46 | public BigDecimal getPositive() { | |
47 |
1
1. getPositive : replaced return value with null for pl/zankowski/iextrading4j/api/alternative/Sentiment::getPositive → KILLED |
return positive; |
48 | } | |
49 | ||
50 | public BigDecimal getNegative() { | |
51 |
1
1. getNegative : replaced return value with null for pl/zankowski/iextrading4j/api/alternative/Sentiment::getNegative → KILLED |
return negative; |
52 | } | |
53 | ||
54 | public LocalTime getMinute() { | |
55 |
1
1. getMinute : replaced return value with null for pl/zankowski/iextrading4j/api/alternative/Sentiment::getMinute → KILLED |
return minute; |
56 | } | |
57 | ||
58 | @Override | |
59 | public boolean equals(final Object o) { | |
60 |
2
1. equals : negated conditional → KILLED 2. equals : replaced boolean return with false for pl/zankowski/iextrading4j/api/alternative/Sentiment::equals → KILLED |
if (this == o) return true; |
61 |
3
1. equals : negated conditional → KILLED 2. equals : negated conditional → KILLED 3. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/alternative/Sentiment::equals → KILLED |
if (o == null || getClass() != o.getClass()) return false; |
62 | final Sentiment sentiment1 = (Sentiment) o; | |
63 |
2
1. equals : negated conditional → KILLED 2. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/alternative/Sentiment::equals → KILLED |
return Objects.equal(sentiment, sentiment1.sentiment) && |
64 |
1
1. equals : negated conditional → KILLED |
Objects.equal(totalScores, sentiment1.totalScores) && |
65 |
1
1. equals : negated conditional → KILLED |
Objects.equal(positive, sentiment1.positive) && |
66 |
1
1. equals : negated conditional → KILLED |
Objects.equal(negative, sentiment1.negative) && |
67 |
1
1. equals : negated conditional → KILLED |
Objects.equal(minute, sentiment1.minute); |
68 | } | |
69 | ||
70 | @Override | |
71 | public int hashCode() { | |
72 |
1
1. hashCode : replaced int return with 0 for pl/zankowski/iextrading4j/api/alternative/Sentiment::hashCode → KILLED |
return Objects.hashCode(sentiment, totalScores, positive, negative, minute); |
73 | } | |
74 | ||
75 | @Override | |
76 | public String toString() { | |
77 |
1
1. toString : replaced return value with "" for pl/zankowski/iextrading4j/api/alternative/Sentiment::toString → KILLED |
return MoreObjects.toStringHelper(this) |
78 | .add("sentiment", sentiment) | |
79 | .add("totalScores", totalScores) | |
80 | .add("positive", positive) | |
81 | .add("negative", negative) | |
82 | .add("minute", minute) | |
83 | .toString(); | |
84 | } | |
85 | ||
86 | } | |
Mutations | ||
39 |
1.1 |
|
43 |
1.1 |
|
47 |
1.1 |
|
51 |
1.1 |
|
55 |
1.1 |
|
60 |
1.1 2.2 |
|
61 |
1.1 2.2 3.3 |
|
63 |
1.1 2.2 |
|
64 |
1.1 |
|
65 |
1.1 |
|
66 |
1.1 |
|
67 |
1.1 |
|
72 |
1.1 |
|
77 |
1.1 |