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 | ||
7 | import java.math.BigDecimal; | |
8 | import java.time.LocalDate; | |
9 | import java.util.Objects; | |
10 | ||
11 | public class IncomeStatement extends Report { | |
12 | ||
13 | private static final long serialVersionUID = -1413080264580022740L; | |
14 | ||
15 | private final BigDecimal totalRevenue; | |
16 | private final BigDecimal costOfRevenue; | |
17 | private final BigDecimal ebit; | |
18 | private final BigDecimal grossProfit; | |
19 | private final BigDecimal incomeTax; | |
20 | private final BigDecimal interestIncome; | |
21 | private final BigDecimal minorityInterest; | |
22 | private final BigDecimal netIncome; | |
23 | private final BigDecimal netIncomeBasic; | |
24 | private final BigDecimal operatingExpense; | |
25 | private final BigDecimal operatingIncome; | |
26 | private final BigDecimal otherIncomeExpenseNet; | |
27 | private final BigDecimal pretaxIncome; | |
28 | private final BigDecimal researchAndDevelopment; | |
29 | private final BigDecimal sellingGeneralAndAdmin; | |
30 | ||
31 | @JsonCreator | |
32 | public IncomeStatement( | |
33 | @JsonProperty("symbol") final String symbol, | |
34 | @JsonProperty("id") final String id, | |
35 | @JsonProperty("key") final String key, | |
36 | @JsonProperty("subkey") final String subkey, | |
37 | @JsonProperty("updated") final Long updated, | |
38 | @JsonProperty("date") final Long date, | |
39 | @JsonProperty("reportDate") final LocalDate reportDate, | |
40 | @JsonProperty("fiscalDate") final LocalDate fiscalDate, | |
41 | @JsonProperty("currency") final String currency, | |
42 | @JsonProperty("totalRevenue") final BigDecimal totalRevenue, | |
43 | @JsonProperty("costOfRevenue") final BigDecimal costOfRevenue, | |
44 | @JsonProperty("grossProfit") final BigDecimal grossProfit, | |
45 | @JsonProperty("researchAndDevelopment") final BigDecimal researchAndDevelopment, | |
46 | @JsonProperty("sellingGeneralAndAdmin") final BigDecimal sellingGeneralAndAdmin, | |
47 | @JsonProperty("operatingExpense") final BigDecimal operatingExpense, | |
48 | @JsonProperty("operatingIncome") final BigDecimal operatingIncome, | |
49 | @JsonProperty("otherIncomeExpenseNet") final BigDecimal otherIncomeExpenseNet, | |
50 | @JsonProperty("ebit") final BigDecimal ebit, | |
51 | @JsonProperty("interestIncome") final BigDecimal interestIncome, | |
52 | @JsonProperty("pretaxIncome") final BigDecimal pretaxIncome, | |
53 | @JsonProperty("incomeTax") final BigDecimal incomeTax, | |
54 | @JsonProperty("minorityInterest") final BigDecimal minorityInterest, | |
55 | @JsonProperty("netIncome") final BigDecimal netIncome, | |
56 | @JsonProperty("netIncomeBasic") final BigDecimal netIncomeBasic, | |
57 | @JsonProperty("filingType") final String filingType, | |
58 | @JsonProperty("fiscalQuarter") final BigDecimal fiscalQuarter, | |
59 | @JsonProperty("fiscalYear") final BigDecimal fiscalYear) { | |
60 | super(symbol, id, key, subkey, updated, reportDate, filingType, fiscalDate, fiscalQuarter, fiscalYear, | |
61 | currency, date); | |
62 | this.totalRevenue = totalRevenue; | |
63 | this.costOfRevenue = costOfRevenue; | |
64 | this.grossProfit = grossProfit; | |
65 | this.researchAndDevelopment = researchAndDevelopment; | |
66 | this.sellingGeneralAndAdmin = sellingGeneralAndAdmin; | |
67 | this.operatingExpense = operatingExpense; | |
68 | this.operatingIncome = operatingIncome; | |
69 | this.otherIncomeExpenseNet = otherIncomeExpenseNet; | |
70 | this.ebit = ebit; | |
71 | this.interestIncome = interestIncome; | |
72 | this.pretaxIncome = pretaxIncome; | |
73 | this.incomeTax = incomeTax; | |
74 | this.minorityInterest = minorityInterest; | |
75 | this.netIncome = netIncome; | |
76 | this.netIncomeBasic = netIncomeBasic; | |
77 | } | |
78 | ||
79 | public BigDecimal getTotalRevenue() { | |
80 |
1
1. getTotalRevenue : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/IncomeStatement::getTotalRevenue → KILLED |
return totalRevenue; |
81 | } | |
82 | ||
83 | public BigDecimal getCostOfRevenue() { | |
84 |
1
1. getCostOfRevenue : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/IncomeStatement::getCostOfRevenue → KILLED |
return costOfRevenue; |
85 | } | |
86 | ||
87 | public BigDecimal getGrossProfit() { | |
88 |
1
1. getGrossProfit : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/IncomeStatement::getGrossProfit → KILLED |
return grossProfit; |
89 | } | |
90 | ||
91 | public BigDecimal getResearchAndDevelopment() { | |
92 |
1
1. getResearchAndDevelopment : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/IncomeStatement::getResearchAndDevelopment → KILLED |
return researchAndDevelopment; |
93 | } | |
94 | ||
95 | public BigDecimal getSellingGeneralAndAdmin() { | |
96 |
1
1. getSellingGeneralAndAdmin : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/IncomeStatement::getSellingGeneralAndAdmin → KILLED |
return sellingGeneralAndAdmin; |
97 | } | |
98 | ||
99 | public BigDecimal getOperatingExpense() { | |
100 |
1
1. getOperatingExpense : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/IncomeStatement::getOperatingExpense → KILLED |
return operatingExpense; |
101 | } | |
102 | ||
103 | public BigDecimal getOperatingIncome() { | |
104 |
1
1. getOperatingIncome : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/IncomeStatement::getOperatingIncome → KILLED |
return operatingIncome; |
105 | } | |
106 | ||
107 | public BigDecimal getOtherIncomeExpenseNet() { | |
108 |
1
1. getOtherIncomeExpenseNet : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/IncomeStatement::getOtherIncomeExpenseNet → KILLED |
return otherIncomeExpenseNet; |
109 | } | |
110 | ||
111 | public BigDecimal getEbit() { | |
112 |
1
1. getEbit : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/IncomeStatement::getEbit → KILLED |
return ebit; |
113 | } | |
114 | ||
115 | public BigDecimal getInterestIncome() { | |
116 |
1
1. getInterestIncome : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/IncomeStatement::getInterestIncome → KILLED |
return interestIncome; |
117 | } | |
118 | ||
119 | public BigDecimal getPretaxIncome() { | |
120 |
1
1. getPretaxIncome : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/IncomeStatement::getPretaxIncome → KILLED |
return pretaxIncome; |
121 | } | |
122 | ||
123 | public BigDecimal getIncomeTax() { | |
124 |
1
1. getIncomeTax : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/IncomeStatement::getIncomeTax → KILLED |
return incomeTax; |
125 | } | |
126 | ||
127 | public BigDecimal getMinorityInterest() { | |
128 |
1
1. getMinorityInterest : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/IncomeStatement::getMinorityInterest → KILLED |
return minorityInterest; |
129 | } | |
130 | ||
131 | public BigDecimal getNetIncome() { | |
132 |
1
1. getNetIncome : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/IncomeStatement::getNetIncome → KILLED |
return netIncome; |
133 | } | |
134 | ||
135 | public BigDecimal getNetIncomeBasic() { | |
136 |
1
1. getNetIncomeBasic : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/IncomeStatement::getNetIncomeBasic → KILLED |
return netIncomeBasic; |
137 | } | |
138 | ||
139 | @Override | |
140 | public boolean equals(final Object o) { | |
141 |
1
1. equals : negated conditional → KILLED |
if (this == o) { |
142 |
1
1. equals : replaced boolean return with false for pl/zankowski/iextrading4j/api/stocks/v1/IncomeStatement::equals → KILLED |
return true; |
143 | } | |
144 |
2
1. equals : negated conditional → KILLED 2. equals : negated conditional → KILLED |
if (o == null || getClass() != o.getClass()) { |
145 |
1
1. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/stocks/v1/IncomeStatement::equals → KILLED |
return false; |
146 | } | |
147 |
1
1. equals : negated conditional → KILLED |
if (!super.equals(o)) { |
148 |
1
1. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/stocks/v1/IncomeStatement::equals → KILLED |
return false; |
149 | } | |
150 | final IncomeStatement that = (IncomeStatement) o; | |
151 |
2
1. equals : negated conditional → KILLED 2. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/stocks/v1/IncomeStatement::equals → KILLED |
return Objects.equals(totalRevenue, that.totalRevenue) && |
152 |
1
1. equals : negated conditional → KILLED |
Objects.equals(costOfRevenue, that.costOfRevenue) && |
153 |
1
1. equals : negated conditional → KILLED |
Objects.equals(grossProfit, that.grossProfit) && |
154 |
1
1. equals : negated conditional → KILLED |
Objects.equals(researchAndDevelopment, that.researchAndDevelopment) && |
155 |
1
1. equals : negated conditional → KILLED |
Objects.equals(sellingGeneralAndAdmin, that.sellingGeneralAndAdmin) && |
156 |
1
1. equals : negated conditional → KILLED |
Objects.equals(operatingExpense, that.operatingExpense) && |
157 |
1
1. equals : negated conditional → KILLED |
Objects.equals(operatingIncome, that.operatingIncome) && |
158 |
1
1. equals : negated conditional → KILLED |
Objects.equals(otherIncomeExpenseNet, that.otherIncomeExpenseNet) && |
159 |
1
1. equals : negated conditional → KILLED |
Objects.equals(ebit, that.ebit) && |
160 |
1
1. equals : negated conditional → KILLED |
Objects.equals(interestIncome, that.interestIncome) && |
161 |
1
1. equals : negated conditional → KILLED |
Objects.equals(pretaxIncome, that.pretaxIncome) && |
162 |
1
1. equals : negated conditional → KILLED |
Objects.equals(incomeTax, that.incomeTax) && |
163 |
1
1. equals : negated conditional → KILLED |
Objects.equals(minorityInterest, that.minorityInterest) && |
164 |
1
1. equals : negated conditional → KILLED |
Objects.equals(netIncome, that.netIncome) && |
165 |
1
1. equals : negated conditional → KILLED |
Objects.equals(netIncomeBasic, that.netIncomeBasic); |
166 | } | |
167 | ||
168 | @Override | |
169 | public int hashCode() { | |
170 |
1
1. hashCode : replaced int return with 0 for pl/zankowski/iextrading4j/api/stocks/v1/IncomeStatement::hashCode → KILLED |
return Objects.hash(super.hashCode(), totalRevenue, costOfRevenue, grossProfit, researchAndDevelopment, |
171 | sellingGeneralAndAdmin, operatingExpense, operatingIncome, otherIncomeExpenseNet, ebit, | |
172 | interestIncome, pretaxIncome, incomeTax, minorityInterest, netIncome, netIncomeBasic); | |
173 | } | |
174 | ||
175 | @Override | |
176 | public String toString() { | |
177 |
1
1. toString : replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/v1/IncomeStatement::toString → KILLED |
return MoreObjects.toStringHelper(this) |
178 | .add("totalRevenue", totalRevenue) | |
179 | .add("costOfRevenue", costOfRevenue) | |
180 | .add("grossProfit", grossProfit) | |
181 | .add("researchAndDevelopment", researchAndDevelopment) | |
182 | .add("sellingGeneralAndAdmin", sellingGeneralAndAdmin) | |
183 | .add("operatingExpense", operatingExpense) | |
184 | .add("operatingIncome", operatingIncome) | |
185 | .add("otherIncomeExpenseNet", otherIncomeExpenseNet) | |
186 | .add("ebit", ebit) | |
187 | .add("interestIncome", interestIncome) | |
188 | .add("pretaxIncome", pretaxIncome) | |
189 | .add("incomeTax", incomeTax) | |
190 | .add("minorityInterest", minorityInterest) | |
191 | .add("netIncome", netIncome) | |
192 | .add("netIncomeBasic", netIncomeBasic) | |
193 | .toString(); | |
194 | } | |
195 | } | |
Mutations | ||
80 |
1.1 |
|
84 |
1.1 |
|
88 |
1.1 |
|
92 |
1.1 |
|
96 |
1.1 |
|
100 |
1.1 |
|
104 |
1.1 |
|
108 |
1.1 |
|
112 |
1.1 |
|
116 |
1.1 |
|
120 |
1.1 |
|
124 |
1.1 |
|
128 |
1.1 |
|
132 |
1.1 |
|
136 |
1.1 |
|
141 |
1.1 |
|
142 |
1.1 |
|
144 |
1.1 2.2 |
|
145 |
1.1 |
|
147 |
1.1 |
|
148 |
1.1 |
|
151 |
1.1 2.2 |
|
152 |
1.1 |
|
153 |
1.1 |
|
154 |
1.1 |
|
155 |
1.1 |
|
156 |
1.1 |
|
157 |
1.1 |
|
158 |
1.1 |
|
159 |
1.1 |
|
160 |
1.1 |
|
161 |
1.1 |
|
162 |
1.1 |
|
163 |
1.1 |
|
164 |
1.1 |
|
165 |
1.1 |
|
170 |
1.1 |
|
177 |
1.1 |