1 | package pl.zankowski.iextrading4j.api.stocks.v1; | |
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 | import java.time.LocalDate; | |
11 | ||
12 | public class BarData implements Serializable { | |
13 | ||
14 | private static final long serialVersionUID = 2796379501226269824L; | |
15 | ||
16 | private final LocalDate date; | |
17 | private final BigDecimal open; | |
18 | private final BigDecimal close; | |
19 | private final BigDecimal high; | |
20 | private final BigDecimal low; | |
21 | private final BigDecimal volume; | |
22 | private final BigDecimal uOpen; | |
23 | private final BigDecimal uClose; | |
24 | private final BigDecimal uHigh; | |
25 | private final BigDecimal uLow; | |
26 | private final BigDecimal uVolume; | |
27 | private final BigDecimal change; | |
28 | private final BigDecimal changePercent; | |
29 | private final BigDecimal changeOverTime; | |
30 | private final String symbol; | |
31 | ||
32 | @JsonCreator | |
33 | public BarData( | |
34 | @JsonProperty("date") final LocalDate date, | |
35 | @JsonProperty("open") final BigDecimal open, | |
36 | @JsonProperty("close") final BigDecimal close, | |
37 | @JsonProperty("high") final BigDecimal high, | |
38 | @JsonProperty("low") final BigDecimal low, | |
39 | @JsonProperty("volume") final BigDecimal volume, | |
40 | @JsonProperty("uOpen") final BigDecimal uOpen, | |
41 | @JsonProperty("uClose") final BigDecimal uClose, | |
42 | @JsonProperty("uHigh") final BigDecimal uHigh, | |
43 | @JsonProperty("uLow") final BigDecimal uLow, | |
44 | @JsonProperty("uVolume") final BigDecimal uVolume, | |
45 | @JsonProperty("change") final BigDecimal change, | |
46 | @JsonProperty("changePercent") final BigDecimal changePercent, | |
47 | @JsonProperty("changeOverTime") final BigDecimal changeOverTime, | |
48 | @JsonProperty("symbol") final String symbol) { | |
49 | this.date = date; | |
50 | this.open = open; | |
51 | this.close = close; | |
52 | this.high = high; | |
53 | this.low = low; | |
54 | this.volume = volume; | |
55 | this.uOpen = uOpen; | |
56 | this.uClose = uClose; | |
57 | this.uHigh = uHigh; | |
58 | this.uLow = uLow; | |
59 | this.uVolume = uVolume; | |
60 | this.change = change; | |
61 | this.changePercent = changePercent; | |
62 | this.changeOverTime = changeOverTime; | |
63 | this.symbol = symbol; | |
64 | } | |
65 | ||
66 | public LocalDate getDate() { | |
67 |
1
1. getDate : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/BarData::getDate → KILLED |
return date; |
68 | } | |
69 | ||
70 | public BigDecimal getOpen() { | |
71 |
1
1. getOpen : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/BarData::getOpen → KILLED |
return open; |
72 | } | |
73 | ||
74 | public BigDecimal getClose() { | |
75 |
1
1. getClose : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/BarData::getClose → KILLED |
return close; |
76 | } | |
77 | ||
78 | public BigDecimal getHigh() { | |
79 |
1
1. getHigh : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/BarData::getHigh → KILLED |
return high; |
80 | } | |
81 | ||
82 | public BigDecimal getLow() { | |
83 |
1
1. getLow : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/BarData::getLow → KILLED |
return low; |
84 | } | |
85 | ||
86 | public BigDecimal getVolume() { | |
87 |
1
1. getVolume : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/BarData::getVolume → KILLED |
return volume; |
88 | } | |
89 | ||
90 | public BigDecimal getuOpen() { | |
91 |
1
1. getuOpen : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/BarData::getuOpen → KILLED |
return uOpen; |
92 | } | |
93 | ||
94 | public BigDecimal getuClose() { | |
95 |
1
1. getuClose : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/BarData::getuClose → KILLED |
return uClose; |
96 | } | |
97 | ||
98 | public BigDecimal getuHigh() { | |
99 |
1
1. getuHigh : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/BarData::getuHigh → KILLED |
return uHigh; |
100 | } | |
101 | ||
102 | public BigDecimal getuLow() { | |
103 |
1
1. getuLow : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/BarData::getuLow → KILLED |
return uLow; |
104 | } | |
105 | ||
106 | public BigDecimal getuVolume() { | |
107 |
1
1. getuVolume : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/BarData::getuVolume → KILLED |
return uVolume; |
108 | } | |
109 | ||
110 | public BigDecimal getChange() { | |
111 |
1
1. getChange : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/BarData::getChange → KILLED |
return change; |
112 | } | |
113 | ||
114 | public BigDecimal getChangePercent() { | |
115 |
1
1. getChangePercent : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/BarData::getChangePercent → KILLED |
return changePercent; |
116 | } | |
117 | ||
118 | public BigDecimal getChangeOverTime() { | |
119 |
1
1. getChangeOverTime : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/BarData::getChangeOverTime → KILLED |
return changeOverTime; |
120 | } | |
121 | ||
122 | public String getSymbol() { | |
123 |
1
1. getSymbol : replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/v1/BarData::getSymbol → KILLED |
return symbol; |
124 | } | |
125 | ||
126 | @Override | |
127 | public boolean equals(final Object o) { | |
128 |
1
1. equals : negated conditional → KILLED |
if (this == o) { |
129 |
1
1. equals : replaced boolean return with false for pl/zankowski/iextrading4j/api/stocks/v1/BarData::equals → KILLED |
return true; |
130 | } | |
131 |
2
1. equals : negated conditional → KILLED 2. equals : negated conditional → KILLED |
if (o == null || getClass() != o.getClass()) { |
132 |
1
1. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/stocks/v1/BarData::equals → KILLED |
return false; |
133 | } | |
134 | final BarData barData = (BarData) o; | |
135 |
2
1. equals : negated conditional → KILLED 2. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/stocks/v1/BarData::equals → KILLED |
return Objects.equal(date, barData.date) && |
136 |
1
1. equals : negated conditional → KILLED |
Objects.equal(open, barData.open) && |
137 |
1
1. equals : negated conditional → KILLED |
Objects.equal(close, barData.close) && |
138 |
1
1. equals : negated conditional → KILLED |
Objects.equal(high, barData.high) && |
139 |
1
1. equals : negated conditional → KILLED |
Objects.equal(low, barData.low) && |
140 |
1
1. equals : negated conditional → KILLED |
Objects.equal(volume, barData.volume) && |
141 |
1
1. equals : negated conditional → KILLED |
Objects.equal(uOpen, barData.uOpen) && |
142 |
1
1. equals : negated conditional → KILLED |
Objects.equal(uClose, barData.uClose) && |
143 |
1
1. equals : negated conditional → KILLED |
Objects.equal(uHigh, barData.uHigh) && |
144 |
1
1. equals : negated conditional → KILLED |
Objects.equal(uLow, barData.uLow) && |
145 |
1
1. equals : negated conditional → KILLED |
Objects.equal(uVolume, barData.uVolume) && |
146 |
1
1. equals : negated conditional → KILLED |
Objects.equal(change, barData.change) && |
147 |
1
1. equals : negated conditional → KILLED |
Objects.equal(changePercent, barData.changePercent) && |
148 |
1
1. equals : negated conditional → KILLED |
Objects.equal(changeOverTime, barData.changeOverTime) && |
149 |
1
1. equals : negated conditional → KILLED |
Objects.equal(symbol, barData.symbol); |
150 | } | |
151 | ||
152 | @Override | |
153 | public int hashCode() { | |
154 |
1
1. hashCode : replaced int return with 0 for pl/zankowski/iextrading4j/api/stocks/v1/BarData::hashCode → KILLED |
return Objects.hashCode(date, open, close, high, low, volume, uOpen, |
155 | uClose, uHigh, uLow, uVolume, change, changePercent, changeOverTime, | |
156 | symbol); | |
157 | } | |
158 | ||
159 | @Override | |
160 | public String toString() { | |
161 |
1
1. toString : replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/v1/BarData::toString → KILLED |
return MoreObjects.toStringHelper(this) |
162 | .add("date", date) | |
163 | .add("open", open) | |
164 | .add("close", close) | |
165 | .add("high", high) | |
166 | .add("low", low) | |
167 | .add("volume", volume) | |
168 | .add("uOpen", uOpen) | |
169 | .add("uClose", uClose) | |
170 | .add("uHigh", uHigh) | |
171 | .add("uLow", uLow) | |
172 | .add("uVolume", uVolume) | |
173 | .add("change", change) | |
174 | .add("changePercent", changePercent) | |
175 | .add("changeOverTime", changeOverTime) | |
176 | .add("symbol", symbol) | |
177 | .toString(); | |
178 | } | |
179 | ||
180 | } | |
Mutations | ||
67 |
1.1 |
|
71 |
1.1 |
|
75 |
1.1 |
|
79 |
1.1 |
|
83 |
1.1 |
|
87 |
1.1 |
|
91 |
1.1 |
|
95 |
1.1 |
|
99 |
1.1 |
|
103 |
1.1 |
|
107 |
1.1 |
|
111 |
1.1 |
|
115 |
1.1 |
|
119 |
1.1 |
|
123 |
1.1 |
|
128 |
1.1 |
|
129 |
1.1 |
|
131 |
1.1 2.2 |
|
132 |
1.1 |
|
135 |
1.1 2.2 |
|
136 |
1.1 |
|
137 |
1.1 |
|
138 |
1.1 |
|
139 |
1.1 |
|
140 |
1.1 |
|
141 |
1.1 |
|
142 |
1.1 |
|
143 |
1.1 |
|
144 |
1.1 |
|
145 |
1.1 |
|
146 |
1.1 |
|
147 |
1.1 |
|
148 |
1.1 |
|
149 |
1.1 |
|
154 |
1.1 |
|
161 |
1.1 |