1 | package pl.zankowski.iextrading4j.api.stocks; | |
2 | ||
3 | import com.fasterxml.jackson.annotation.JsonCreator; | |
4 | import com.fasterxml.jackson.annotation.JsonProperty; | |
5 | import pl.zankowski.iextrading4j.api.util.ListUtil; | |
6 | ||
7 | import java.math.BigDecimal; | |
8 | import java.util.List; | |
9 | import java.util.Objects; | |
10 | import java.util.StringJoiner; | |
11 | ||
12 | public class Chart extends TimeSeries { | |
13 | ||
14 | private static final long serialVersionUID = -9161802845718659470L; | |
15 | ||
16 | private final String minute; | |
17 | private final BigDecimal marketAverage; | |
18 | private final BigDecimal marketNotional; | |
19 | private final BigDecimal marketNumberOfTrades; | |
20 | private final BigDecimal marketHigh; | |
21 | private final BigDecimal marketLow; | |
22 | private final BigDecimal marketVolume; | |
23 | private final BigDecimal marketChangeOverTime; | |
24 | private final BigDecimal marketOpen; | |
25 | private final BigDecimal marketClose; | |
26 | private final BigDecimal average; | |
27 | private final BigDecimal notional; | |
28 | private final BigDecimal numberOfTrades; | |
29 | private final List<BigDecimal> simplifyFactor; | |
30 | private final String currency; | |
31 | ||
32 | @JsonCreator | |
33 | public Chart( | |
34 | @JsonProperty("symbol") final String symbol, | |
35 | @JsonProperty("id") final String id, | |
36 | @JsonProperty("key") final String key, | |
37 | @JsonProperty("subkey") final String subkey, | |
38 | @JsonProperty("updated") final Long updated, | |
39 | @JsonProperty("minute") final String minute, | |
40 | @JsonProperty("marketAverage") final BigDecimal marketAverage, | |
41 | @JsonProperty("marketNotional") final BigDecimal marketNotional, | |
42 | @JsonProperty("marketNumberOfTrades") final BigDecimal marketNumberOfTrades, | |
43 | @JsonProperty("marketHigh") final BigDecimal marketHigh, | |
44 | @JsonProperty("marketLow") final BigDecimal marketLow, | |
45 | @JsonProperty("marketVolume") final BigDecimal marketVolume, | |
46 | @JsonProperty("marketChangeOverTime") final BigDecimal marketChangeOverTime, | |
47 | @JsonProperty("marketOpen") final BigDecimal marketOpen, | |
48 | @JsonProperty("marketClose") final BigDecimal marketClose, | |
49 | @JsonProperty("average") final BigDecimal average, | |
50 | @JsonProperty("notional") final BigDecimal notional, | |
51 | @JsonProperty("numberOfTrades") final BigDecimal numberOfTrades, | |
52 | @JsonProperty("simplifyFactor") final List<BigDecimal> simplifyFactor, | |
53 | @JsonProperty("high") final BigDecimal high, | |
54 | @JsonProperty("low") final BigDecimal low, | |
55 | @JsonProperty("volume") final BigDecimal volume, | |
56 | @JsonProperty("label") final String label, | |
57 | @JsonProperty("changeOverTime") final BigDecimal changeOverTime, | |
58 | @JsonProperty("date") final String date, | |
59 | @JsonProperty("open") final BigDecimal open, | |
60 | @JsonProperty("close") final BigDecimal close, | |
61 | @JsonProperty("uOpen") final BigDecimal uOpen, | |
62 | @JsonProperty("uHigh") final BigDecimal uHigh, | |
63 | @JsonProperty("uLow") final BigDecimal uLow, | |
64 | @JsonProperty("uClose") final BigDecimal uClose, | |
65 | @JsonProperty("uVolume") final BigDecimal uVolume, | |
66 | @JsonProperty("fOpen") final BigDecimal fOpen, | |
67 | @JsonProperty("fHigh") final BigDecimal fHigh, | |
68 | @JsonProperty("fLow") final BigDecimal fLow, | |
69 | @JsonProperty("fClose") final BigDecimal fClose, | |
70 | @JsonProperty("fVolume") final BigDecimal fVolume, | |
71 | @JsonProperty("unadjustedVolume") final BigDecimal unadjustedVolume, | |
72 | @JsonProperty("change") final BigDecimal change, | |
73 | @JsonProperty("changePercent") final BigDecimal changePercent, | |
74 | @JsonProperty("vwap") final BigDecimal vwap, | |
75 | @JsonProperty("currency") final String currency) { | |
76 | super(symbol, id, key, subkey, updated, date, open, high, low, close, volume, uOpen, uHigh, uLow, uClose, | |
77 | uVolume, fOpen, fHigh, fLow, fClose, fVolume, unadjustedVolume, change, changePercent, vwap, label, | |
78 | changeOverTime); | |
79 | this.minute = minute; | |
80 | this.marketAverage = marketAverage; | |
81 | this.marketNotional = marketNotional; | |
82 | this.marketNumberOfTrades = marketNumberOfTrades; | |
83 | this.marketHigh = marketHigh; | |
84 | this.marketLow = marketLow; | |
85 | this.marketVolume = marketVolume; | |
86 | this.marketChangeOverTime = marketChangeOverTime; | |
87 | this.marketOpen = marketOpen; | |
88 | this.marketClose = marketClose; | |
89 | this.average = average; | |
90 | this.notional = notional; | |
91 | this.numberOfTrades = numberOfTrades; | |
92 | this.simplifyFactor = ListUtil.immutableList(simplifyFactor); | |
93 | this.currency = currency; | |
94 | } | |
95 | ||
96 | public String getMinute() { | |
97 |
1
1. getMinute : replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/Chart::getMinute → KILLED |
return minute; |
98 | } | |
99 | ||
100 | public BigDecimal getMarketAverage() { | |
101 |
1
1. getMarketAverage : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/Chart::getMarketAverage → KILLED |
return marketAverage; |
102 | } | |
103 | ||
104 | public BigDecimal getMarketNotional() { | |
105 |
1
1. getMarketNotional : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/Chart::getMarketNotional → KILLED |
return marketNotional; |
106 | } | |
107 | ||
108 | public BigDecimal getMarketNumberOfTrades() { | |
109 |
1
1. getMarketNumberOfTrades : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/Chart::getMarketNumberOfTrades → KILLED |
return marketNumberOfTrades; |
110 | } | |
111 | ||
112 | public BigDecimal getMarketHigh() { | |
113 |
1
1. getMarketHigh : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/Chart::getMarketHigh → KILLED |
return marketHigh; |
114 | } | |
115 | ||
116 | public BigDecimal getMarketLow() { | |
117 |
1
1. getMarketLow : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/Chart::getMarketLow → KILLED |
return marketLow; |
118 | } | |
119 | ||
120 | public BigDecimal getMarketVolume() { | |
121 |
1
1. getMarketVolume : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/Chart::getMarketVolume → KILLED |
return marketVolume; |
122 | } | |
123 | ||
124 | public BigDecimal getMarketChangeOverTime() { | |
125 |
1
1. getMarketChangeOverTime : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/Chart::getMarketChangeOverTime → KILLED |
return marketChangeOverTime; |
126 | } | |
127 | ||
128 | public BigDecimal getMarketOpen() { | |
129 |
1
1. getMarketOpen : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/Chart::getMarketOpen → KILLED |
return marketOpen; |
130 | } | |
131 | ||
132 | public BigDecimal getMarketClose() { | |
133 |
1
1. getMarketClose : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/Chart::getMarketClose → KILLED |
return marketClose; |
134 | } | |
135 | ||
136 | public BigDecimal getAverage() { | |
137 |
1
1. getAverage : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/Chart::getAverage → KILLED |
return average; |
138 | } | |
139 | ||
140 | public BigDecimal getNotional() { | |
141 |
1
1. getNotional : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/Chart::getNotional → KILLED |
return notional; |
142 | } | |
143 | ||
144 | public BigDecimal getNumberOfTrades() { | |
145 |
1
1. getNumberOfTrades : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/Chart::getNumberOfTrades → KILLED |
return numberOfTrades; |
146 | } | |
147 | ||
148 | public List<BigDecimal> getSimplifyFactor() { | |
149 |
1
1. getSimplifyFactor : replaced return value with Collections.emptyList for pl/zankowski/iextrading4j/api/stocks/Chart::getSimplifyFactor → KILLED |
return simplifyFactor; |
150 | } | |
151 | ||
152 | public String getCurrency() { | |
153 |
1
1. getCurrency : replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/Chart::getCurrency → KILLED |
return currency; |
154 | } | |
155 | ||
156 | @Override | |
157 | public boolean equals(final Object o) { | |
158 |
1
1. equals : negated conditional → KILLED |
if (this == o) { |
159 |
1
1. equals : replaced boolean return with false for pl/zankowski/iextrading4j/api/stocks/Chart::equals → KILLED |
return true; |
160 | } | |
161 |
2
1. equals : negated conditional → KILLED 2. equals : negated conditional → KILLED |
if (o == null || getClass() != o.getClass()) { |
162 |
1
1. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/stocks/Chart::equals → KILLED |
return false; |
163 | } | |
164 |
1
1. equals : negated conditional → KILLED |
if (!super.equals(o)) { |
165 |
1
1. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/stocks/Chart::equals → KILLED |
return false; |
166 | } | |
167 | final Chart chart = (Chart) o; | |
168 |
2
1. equals : negated conditional → KILLED 2. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/stocks/Chart::equals → KILLED |
return Objects.equals(minute, chart.minute) && |
169 |
1
1. equals : negated conditional → KILLED |
Objects.equals(marketAverage, chart.marketAverage) && |
170 |
1
1. equals : negated conditional → KILLED |
Objects.equals(marketNotional, chart.marketNotional) && |
171 |
1
1. equals : negated conditional → KILLED |
Objects.equals(marketNumberOfTrades, chart.marketNumberOfTrades) && |
172 |
1
1. equals : negated conditional → KILLED |
Objects.equals(marketHigh, chart.marketHigh) && |
173 |
1
1. equals : negated conditional → KILLED |
Objects.equals(marketLow, chart.marketLow) && |
174 |
1
1. equals : negated conditional → KILLED |
Objects.equals(marketVolume, chart.marketVolume) && |
175 |
1
1. equals : negated conditional → KILLED |
Objects.equals(marketChangeOverTime, chart.marketChangeOverTime) && |
176 |
1
1. equals : negated conditional → KILLED |
Objects.equals(marketOpen, chart.marketOpen) && |
177 |
1
1. equals : negated conditional → KILLED |
Objects.equals(marketClose, chart.marketClose) && |
178 |
1
1. equals : negated conditional → KILLED |
Objects.equals(average, chart.average) && |
179 |
1
1. equals : negated conditional → KILLED |
Objects.equals(notional, chart.notional) && |
180 |
1
1. equals : negated conditional → KILLED |
Objects.equals(numberOfTrades, chart.numberOfTrades) && |
181 |
1
1. equals : negated conditional → KILLED |
Objects.equals(simplifyFactor, chart.simplifyFactor) && |
182 |
1
1. equals : negated conditional → KILLED |
Objects.equals(currency, chart.currency); |
183 | } | |
184 | ||
185 | @Override | |
186 | public int hashCode() { | |
187 |
1
1. hashCode : replaced int return with 0 for pl/zankowski/iextrading4j/api/stocks/Chart::hashCode → KILLED |
return Objects.hash(super.hashCode(), minute, marketAverage, marketNotional, marketNumberOfTrades, |
188 | marketHigh, marketLow, marketVolume, marketChangeOverTime, marketOpen, marketClose, average, | |
189 | notional, numberOfTrades, simplifyFactor, currency); | |
190 | } | |
191 | ||
192 | @Override | |
193 | public String toString() { | |
194 |
1
1. toString : replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/Chart::toString → KILLED |
return new StringJoiner(", ", Chart.class.getSimpleName() + "[", "]") |
195 | .add("minute='" + minute + "'") | |
196 | .add("marketAverage=" + marketAverage) | |
197 | .add("marketNotional=" + marketNotional) | |
198 | .add("marketNumberOfTrades=" + marketNumberOfTrades) | |
199 | .add("marketHigh=" + marketHigh) | |
200 | .add("marketLow=" + marketLow) | |
201 | .add("marketVolume=" + marketVolume) | |
202 | .add("marketChangeOverTime=" + marketChangeOverTime) | |
203 | .add("marketOpen=" + marketOpen) | |
204 | .add("marketClose=" + marketClose) | |
205 | .add("average=" + average) | |
206 | .add("notional=" + notional) | |
207 | .add("numberOfTrades=" + numberOfTrades) | |
208 | .add("simplifyFactor=" + simplifyFactor) | |
209 | .add("currency='" + currency + "'") | |
210 | .toString(); | |
211 | } | |
212 | } | |
Mutations | ||
97 |
1.1 |
|
101 |
1.1 |
|
105 |
1.1 |
|
109 |
1.1 |
|
113 |
1.1 |
|
117 |
1.1 |
|
121 |
1.1 |
|
125 |
1.1 |
|
129 |
1.1 |
|
133 |
1.1 |
|
137 |
1.1 |
|
141 |
1.1 |
|
145 |
1.1 |
|
149 |
1.1 |
|
153 |
1.1 |
|
158 |
1.1 |
|
159 |
1.1 |
|
161 |
1.1 2.2 |
|
162 |
1.1 |
|
164 |
1.1 |
|
165 |
1.1 |
|
168 |
1.1 2.2 |
|
169 |
1.1 |
|
170 |
1.1 |
|
171 |
1.1 |
|
172 |
1.1 |
|
173 |
1.1 |
|
174 |
1.1 |
|
175 |
1.1 |
|
176 |
1.1 |
|
177 |
1.1 |
|
178 |
1.1 |
|
179 |
1.1 |
|
180 |
1.1 |
|
181 |
1.1 |
|
182 |
1.1 |
|
187 |
1.1 |
|
194 |
1.1 |