ShortInterest.java

1
package pl.zankowski.iextrading4j.api.stocks;
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
import pl.zankowski.iextrading4j.api.refdata.Flag;
9
10
import java.io.Serializable;
11
import java.math.BigDecimal;
12
import java.time.LocalDate;
13
14
public class ShortInterest implements Serializable {
15
16
    private static final long serialVersionUID = 3667871969291332272L;
17
18
    private final LocalDate settlementDate;
19
    private final String symbolInINETSymbology;
20
    private final String symbolInCQSSymbology;
21
    private final String symbolInCMSSymbology;
22
    private final String cusip;
23
    private final String securityName;
24
    private final String companyName;
25
    private final BigDecimal currentShortInterest;
26
    private final BigDecimal previousShortInterest;
27
    private final BigDecimal percentChange;
28
    private final BigDecimal averageDailyVolume;
29
    private final BigDecimal daystoCover;
30
    private final Flag stockAdjustmentFlag;
31
    private final Flag newIssueFlag;
32
    private final Flag revisionFlag;
33
34
    @JsonCreator
35
    public ShortInterest(
36
            @JsonProperty("SettlementDate") @JsonFormat(pattern = "yyyyMMdd") final LocalDate settlementDate,
37
            @JsonProperty("SymbolinINETSymbology") final String symbolInINETSymbology,
38
            @JsonProperty("SymbolinCQSSymbology") final String symbolInCQSSymbology,
39
            @JsonProperty("SymbolinCMSSymbology") final String symbolInCMSSymbology,
40
            @JsonProperty("CUSIP") final String cusip,
41
            @JsonProperty("SecurityName") final String securityName,
42
            @JsonProperty("CompanyName") final String companyName,
43
            @JsonProperty("CurrentShortInterest") final BigDecimal currentShortInterest,
44
            @JsonProperty("PreviousShortInterest") final BigDecimal previousShortInterest,
45
            @JsonProperty("PercentChange") final BigDecimal percentChange,
46
            @JsonProperty("AverageDailyVolume") final BigDecimal averageDailyVolume,
47
            @JsonProperty("DaystoCover") final BigDecimal daystoCover,
48
            @JsonProperty("StockAdjustmentFlag") final Flag stockAdjustmentFlag,
49
            @JsonProperty("NewIssueFlag") final Flag newIssueFlag,
50
            @JsonProperty("RevisionFlag") final Flag revisionFlag) {
51
        this.settlementDate = settlementDate;
52
        this.symbolInINETSymbology = symbolInINETSymbology;
53
        this.symbolInCQSSymbology = symbolInCQSSymbology;
54
        this.symbolInCMSSymbology = symbolInCMSSymbology;
55
        this.cusip = cusip;
56
        this.securityName = securityName;
57
        this.companyName = companyName;
58
        this.currentShortInterest = currentShortInterest;
59
        this.previousShortInterest = previousShortInterest;
60
        this.percentChange = percentChange;
61
        this.averageDailyVolume = averageDailyVolume;
62
        this.daystoCover = daystoCover;
63
        this.stockAdjustmentFlag = stockAdjustmentFlag;
64
        this.newIssueFlag = newIssueFlag;
65
        this.revisionFlag = revisionFlag;
66
    }
67
68
    public LocalDate getSettlementDate() {
69 1 1. getSettlementDate : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/ShortInterest::getSettlementDate → KILLED
        return settlementDate;
70
    }
71
72
    public String getSymbolInINETSymbology() {
73 1 1. getSymbolInINETSymbology : replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/ShortInterest::getSymbolInINETSymbology → KILLED
        return symbolInINETSymbology;
74
    }
75
76
    public String getSymbolInCQSSymbology() {
77 1 1. getSymbolInCQSSymbology : replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/ShortInterest::getSymbolInCQSSymbology → KILLED
        return symbolInCQSSymbology;
78
    }
79
80
    public String getSymbolInCMSSymbology() {
81 1 1. getSymbolInCMSSymbology : replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/ShortInterest::getSymbolInCMSSymbology → KILLED
        return symbolInCMSSymbology;
82
    }
83
84
    public String getCusip() {
85 1 1. getCusip : replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/ShortInterest::getCusip → KILLED
        return cusip;
86
    }
87
88
    public String getSecurityName() {
89 1 1. getSecurityName : replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/ShortInterest::getSecurityName → KILLED
        return securityName;
90
    }
91
92
    public String getCompanyName() {
93 1 1. getCompanyName : replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/ShortInterest::getCompanyName → KILLED
        return companyName;
94
    }
95
96
    public BigDecimal getCurrentShortInterest() {
97 1 1. getCurrentShortInterest : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/ShortInterest::getCurrentShortInterest → KILLED
        return currentShortInterest;
98
    }
99
100
    public BigDecimal getPreviousShortInterest() {
101 1 1. getPreviousShortInterest : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/ShortInterest::getPreviousShortInterest → KILLED
        return previousShortInterest;
102
    }
103
104
    public BigDecimal getPercentChange() {
105 1 1. getPercentChange : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/ShortInterest::getPercentChange → KILLED
        return percentChange;
106
    }
107
108
    public BigDecimal getAverageDailyVolume() {
109 1 1. getAverageDailyVolume : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/ShortInterest::getAverageDailyVolume → KILLED
        return averageDailyVolume;
110
    }
111
112
    public BigDecimal getDaystoCover() {
113 1 1. getDaystoCover : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/ShortInterest::getDaystoCover → KILLED
        return daystoCover;
114
    }
115
116
    public Flag getStockAdjustmentFlag() {
117 1 1. getStockAdjustmentFlag : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/ShortInterest::getStockAdjustmentFlag → KILLED
        return stockAdjustmentFlag;
118
    }
119
120
    public Flag getNewIssueFlag() {
121 1 1. getNewIssueFlag : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/ShortInterest::getNewIssueFlag → KILLED
        return newIssueFlag;
122
    }
123
124
    public Flag getRevisionFlag() {
125 1 1. getRevisionFlag : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/ShortInterest::getRevisionFlag → KILLED
        return revisionFlag;
126
    }
127
128
    @Override
129
    public boolean equals(final Object o) {
130 2 1. equals : negated conditional → KILLED
2. equals : replaced boolean return with false for pl/zankowski/iextrading4j/api/stocks/ShortInterest::equals → KILLED
        if (this == o) return true;
131 3 1. equals : negated conditional → KILLED
2. equals : negated conditional → KILLED
3. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/stocks/ShortInterest::equals → KILLED
        if (o == null || getClass() != o.getClass()) return false;
132
        final ShortInterest that = (ShortInterest) o;
133 2 1. equals : negated conditional → KILLED
2. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/stocks/ShortInterest::equals → KILLED
        return Objects.equal(settlementDate, that.settlementDate) &&
134 1 1. equals : negated conditional → KILLED
                Objects.equal(symbolInINETSymbology, that.symbolInINETSymbology) &&
135 1 1. equals : negated conditional → KILLED
                Objects.equal(symbolInCQSSymbology, that.symbolInCQSSymbology) &&
136 1 1. equals : negated conditional → KILLED
                Objects.equal(symbolInCMSSymbology, that.symbolInCMSSymbology) &&
137 1 1. equals : negated conditional → KILLED
                Objects.equal(cusip, that.cusip) &&
138 1 1. equals : negated conditional → KILLED
                Objects.equal(securityName, that.securityName) &&
139 1 1. equals : negated conditional → KILLED
                Objects.equal(companyName, that.companyName) &&
140 1 1. equals : negated conditional → KILLED
                Objects.equal(currentShortInterest, that.currentShortInterest) &&
141 1 1. equals : negated conditional → KILLED
                Objects.equal(previousShortInterest, that.previousShortInterest) &&
142 1 1. equals : negated conditional → KILLED
                Objects.equal(percentChange, that.percentChange) &&
143 1 1. equals : negated conditional → KILLED
                Objects.equal(averageDailyVolume, that.averageDailyVolume) &&
144 4 1. equals : negated conditional → KILLED
2. equals : negated conditional → KILLED
3. equals : negated conditional → KILLED
4. equals : negated conditional → KILLED
                Objects.equal(daystoCover, that.daystoCover) &&
145
                stockAdjustmentFlag == that.stockAdjustmentFlag &&
146
                newIssueFlag == that.newIssueFlag &&
147
                revisionFlag == that.revisionFlag;
148
    }
149
150
    @Override
151
    public int hashCode() {
152 1 1. hashCode : replaced int return with 0 for pl/zankowski/iextrading4j/api/stocks/ShortInterest::hashCode → KILLED
        return Objects.hashCode(settlementDate, symbolInINETSymbology, symbolInCQSSymbology, symbolInCMSSymbology,
153
                cusip, securityName, companyName, currentShortInterest, previousShortInterest, percentChange,
154
                averageDailyVolume, daystoCover, stockAdjustmentFlag, newIssueFlag, revisionFlag);
155
    }
156
157
    @Override
158
    public String toString() {
159 1 1. toString : replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/ShortInterest::toString → KILLED
        return MoreObjects.toStringHelper(this)
160
                .add("settlementDate", settlementDate)
161
                .add("symbolInINETSymbology", symbolInINETSymbology)
162
                .add("symbolInCQSSymbology", symbolInCQSSymbology)
163
                .add("symbolInCMSSymbology", symbolInCMSSymbology)
164
                .add("cusip", cusip)
165
                .add("securityName", securityName)
166
                .add("companyName", companyName)
167
                .add("currentShortInterest", currentShortInterest)
168
                .add("previousShortInterest", previousShortInterest)
169
                .add("percentChange", percentChange)
170
                .add("averageDailyVolume", averageDailyVolume)
171
                .add("daystoCover", daystoCover)
172
                .add("stockAdjustmentFlag", stockAdjustmentFlag)
173
                .add("newIssueFlag", newIssueFlag)
174
                .add("revisionFlag", revisionFlag)
175
                .toString();
176
    }
177
}

Mutations

69

1.1
Location : getSettlementDate
Killed by : pl.zankowski.iextrading4j.api.stocks.ShortInterestTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.ShortInterestTest]/[method:constructor()]
replaced return value with null for pl/zankowski/iextrading4j/api/stocks/ShortInterest::getSettlementDate → KILLED

73

1.1
Location : getSymbolInINETSymbology
Killed by : pl.zankowski.iextrading4j.api.stocks.ShortInterestTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.ShortInterestTest]/[method:constructor()]
replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/ShortInterest::getSymbolInINETSymbology → KILLED

77

1.1
Location : getSymbolInCQSSymbology
Killed by : pl.zankowski.iextrading4j.api.stocks.ShortInterestTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.ShortInterestTest]/[method:constructor()]
replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/ShortInterest::getSymbolInCQSSymbology → KILLED

81

1.1
Location : getSymbolInCMSSymbology
Killed by : pl.zankowski.iextrading4j.api.stocks.ShortInterestTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.ShortInterestTest]/[method:constructor()]
replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/ShortInterest::getSymbolInCMSSymbology → KILLED

85

1.1
Location : getCusip
Killed by : pl.zankowski.iextrading4j.api.stocks.ShortInterestTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.ShortInterestTest]/[method:constructor()]
replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/ShortInterest::getCusip → KILLED

89

1.1
Location : getSecurityName
Killed by : pl.zankowski.iextrading4j.api.stocks.ShortInterestTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.ShortInterestTest]/[method:constructor()]
replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/ShortInterest::getSecurityName → KILLED

93

1.1
Location : getCompanyName
Killed by : pl.zankowski.iextrading4j.api.stocks.ShortInterestTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.ShortInterestTest]/[method:constructor()]
replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/ShortInterest::getCompanyName → KILLED

97

1.1
Location : getCurrentShortInterest
Killed by : pl.zankowski.iextrading4j.api.stocks.ShortInterestTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.ShortInterestTest]/[method:constructor()]
replaced return value with null for pl/zankowski/iextrading4j/api/stocks/ShortInterest::getCurrentShortInterest → KILLED

101

1.1
Location : getPreviousShortInterest
Killed by : pl.zankowski.iextrading4j.api.stocks.ShortInterestTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.ShortInterestTest]/[method:constructor()]
replaced return value with null for pl/zankowski/iextrading4j/api/stocks/ShortInterest::getPreviousShortInterest → KILLED

105

1.1
Location : getPercentChange
Killed by : pl.zankowski.iextrading4j.api.stocks.ShortInterestTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.ShortInterestTest]/[method:constructor()]
replaced return value with null for pl/zankowski/iextrading4j/api/stocks/ShortInterest::getPercentChange → KILLED

109

1.1
Location : getAverageDailyVolume
Killed by : pl.zankowski.iextrading4j.api.stocks.ShortInterestTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.ShortInterestTest]/[method:constructor()]
replaced return value with null for pl/zankowski/iextrading4j/api/stocks/ShortInterest::getAverageDailyVolume → KILLED

113

1.1
Location : getDaystoCover
Killed by : pl.zankowski.iextrading4j.api.stocks.ShortInterestTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.ShortInterestTest]/[method:constructor()]
replaced return value with null for pl/zankowski/iextrading4j/api/stocks/ShortInterest::getDaystoCover → KILLED

117

1.1
Location : getStockAdjustmentFlag
Killed by : pl.zankowski.iextrading4j.api.stocks.ShortInterestTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.ShortInterestTest]/[method:constructor()]
replaced return value with null for pl/zankowski/iextrading4j/api/stocks/ShortInterest::getStockAdjustmentFlag → KILLED

121

1.1
Location : getNewIssueFlag
Killed by : pl.zankowski.iextrading4j.api.stocks.ShortInterestTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.ShortInterestTest]/[method:constructor()]
replaced return value with null for pl/zankowski/iextrading4j/api/stocks/ShortInterest::getNewIssueFlag → KILLED

125

1.1
Location : getRevisionFlag
Killed by : pl.zankowski.iextrading4j.api.stocks.ShortInterestTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.ShortInterestTest]/[method:constructor()]
replaced return value with null for pl/zankowski/iextrading4j/api/stocks/ShortInterest::getRevisionFlag → KILLED

130

1.1
Location : equals
Killed by : pl.zankowski.iextrading4j.api.stocks.ShortInterestTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.ShortInterestTest]/[method:equalsContract()]
negated conditional → KILLED

2.2
Location : equals
Killed by : pl.zankowski.iextrading4j.api.stocks.ShortInterestTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.ShortInterestTest]/[method:equalsContract()]
replaced boolean return with false for pl/zankowski/iextrading4j/api/stocks/ShortInterest::equals → KILLED

131

1.1
Location : equals
Killed by : pl.zankowski.iextrading4j.api.stocks.ShortInterestTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.ShortInterestTest]/[method:equalsContract()]
negated conditional → KILLED

2.2
Location : equals
Killed by : pl.zankowski.iextrading4j.api.stocks.ShortInterestTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.ShortInterestTest]/[method:equalsContract()]
negated conditional → KILLED

3.3
Location : equals
Killed by : pl.zankowski.iextrading4j.api.stocks.ShortInterestTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.ShortInterestTest]/[method:equalsContract()]
replaced boolean return with true for pl/zankowski/iextrading4j/api/stocks/ShortInterest::equals → KILLED

133

1.1
Location : equals
Killed by : pl.zankowski.iextrading4j.api.stocks.ShortInterestTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.ShortInterestTest]/[method:equalsContract()]
negated conditional → KILLED

2.2
Location : equals
Killed by : pl.zankowski.iextrading4j.api.stocks.ShortInterestTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.ShortInterestTest]/[method:equalsContract()]
replaced boolean return with true for pl/zankowski/iextrading4j/api/stocks/ShortInterest::equals → KILLED

134

1.1
Location : equals
Killed by : pl.zankowski.iextrading4j.api.stocks.ShortInterestTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.ShortInterestTest]/[method:equalsContract()]
negated conditional → KILLED

135

1.1
Location : equals
Killed by : pl.zankowski.iextrading4j.api.stocks.ShortInterestTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.ShortInterestTest]/[method:equalsContract()]
negated conditional → KILLED

136

1.1
Location : equals
Killed by : pl.zankowski.iextrading4j.api.stocks.ShortInterestTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.ShortInterestTest]/[method:equalsContract()]
negated conditional → KILLED

137

1.1
Location : equals
Killed by : pl.zankowski.iextrading4j.api.stocks.ShortInterestTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.ShortInterestTest]/[method:equalsContract()]
negated conditional → KILLED

138

1.1
Location : equals
Killed by : pl.zankowski.iextrading4j.api.stocks.ShortInterestTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.ShortInterestTest]/[method:equalsContract()]
negated conditional → KILLED

139

1.1
Location : equals
Killed by : pl.zankowski.iextrading4j.api.stocks.ShortInterestTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.ShortInterestTest]/[method:equalsContract()]
negated conditional → KILLED

140

1.1
Location : equals
Killed by : pl.zankowski.iextrading4j.api.stocks.ShortInterestTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.ShortInterestTest]/[method:equalsContract()]
negated conditional → KILLED

141

1.1
Location : equals
Killed by : pl.zankowski.iextrading4j.api.stocks.ShortInterestTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.ShortInterestTest]/[method:equalsContract()]
negated conditional → KILLED

142

1.1
Location : equals
Killed by : pl.zankowski.iextrading4j.api.stocks.ShortInterestTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.ShortInterestTest]/[method:equalsContract()]
negated conditional → KILLED

143

1.1
Location : equals
Killed by : pl.zankowski.iextrading4j.api.stocks.ShortInterestTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.ShortInterestTest]/[method:equalsContract()]
negated conditional → KILLED

144

1.1
Location : equals
Killed by : pl.zankowski.iextrading4j.api.stocks.ShortInterestTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.ShortInterestTest]/[method:equalsContract()]
negated conditional → KILLED

2.2
Location : equals
Killed by : pl.zankowski.iextrading4j.api.stocks.ShortInterestTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.ShortInterestTest]/[method:equalsContract()]
negated conditional → KILLED

3.3
Location : equals
Killed by : pl.zankowski.iextrading4j.api.stocks.ShortInterestTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.ShortInterestTest]/[method:equalsContract()]
negated conditional → KILLED

4.4
Location : equals
Killed by : pl.zankowski.iextrading4j.api.stocks.ShortInterestTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.ShortInterestTest]/[method:equalsContract()]
negated conditional → KILLED

152

1.1
Location : hashCode
Killed by : pl.zankowski.iextrading4j.api.stocks.ShortInterestTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.ShortInterestTest]/[method:equalsContract()]
replaced int return with 0 for pl/zankowski/iextrading4j/api/stocks/ShortInterest::hashCode → KILLED

159

1.1
Location : toString
Killed by : pl.zankowski.iextrading4j.api.stocks.ShortInterestTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.ShortInterestTest]/[method:toStringVerification()]
replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/ShortInterest::toString → KILLED

Active mutators

Tests examined


Report generated by PIT 1.7.1