1 | package pl.zankowski.iextrading4j.api.marketdata; | |
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.math.BigDecimal; | |
9 | import java.time.LocalTime; | |
10 | ||
11 | public class Auction implements DeepResult { | |
12 | ||
13 | private static final long serialVersionUID = 5635671777545800835L; | |
14 | ||
15 | private final AuctionType auctionType; | |
16 | private final BigDecimal pairedShares; | |
17 | private final BigDecimal imbalanceShares; | |
18 | private final BigDecimal referencePrice; | |
19 | private final BigDecimal indicativePrice; | |
20 | private final BigDecimal auctionBookPrice; | |
21 | private final BigDecimal collarReferencePrice; | |
22 | private final BigDecimal lowerCollarPrice; | |
23 | private final BigDecimal upperCollarPrice; | |
24 | private final BigDecimal extensionNumber; | |
25 | private final LocalTime startTime; | |
26 | private final Long lastUpdate; | |
27 | ||
28 | @JsonCreator | |
29 | public Auction( | |
30 | @JsonProperty("auctionType") final AuctionType auctionType, | |
31 | @JsonProperty("pairedShares") final BigDecimal pairedShares, | |
32 | @JsonProperty("imbalanceShares") final BigDecimal imbalanceShares, | |
33 | @JsonProperty("referencePrice") final BigDecimal referencePrice, | |
34 | @JsonProperty("indicativePrice") final BigDecimal indicativePrice, | |
35 | @JsonProperty("auctionBookPrice") final BigDecimal auctionBookPrice, | |
36 | @JsonProperty("collarReferencePrice") final BigDecimal collarReferencePrice, | |
37 | @JsonProperty("lowerCollarPrice") final BigDecimal lowerCollarPrice, | |
38 | @JsonProperty("upperCollarPrice") final BigDecimal upperCollarPrice, | |
39 | @JsonProperty("extensionNumber") final BigDecimal extensionNumber, | |
40 | @JsonProperty("startTime") final LocalTime startTime, | |
41 | @JsonProperty("lastUpdate") final Long lastUpdate) { | |
42 | this.auctionType = auctionType; | |
43 | this.pairedShares = pairedShares; | |
44 | this.imbalanceShares = imbalanceShares; | |
45 | this.referencePrice = referencePrice; | |
46 | this.indicativePrice = indicativePrice; | |
47 | this.auctionBookPrice = auctionBookPrice; | |
48 | this.collarReferencePrice = collarReferencePrice; | |
49 | this.lowerCollarPrice = lowerCollarPrice; | |
50 | this.upperCollarPrice = upperCollarPrice; | |
51 | this.extensionNumber = extensionNumber; | |
52 | this.startTime = startTime; | |
53 | this.lastUpdate = lastUpdate; | |
54 | } | |
55 | ||
56 | public AuctionType getAuctionType() { | |
57 |
1
1. getAuctionType : replaced return value with null for pl/zankowski/iextrading4j/api/marketdata/Auction::getAuctionType → KILLED |
return auctionType; |
58 | } | |
59 | ||
60 | public BigDecimal getPairedShares() { | |
61 |
1
1. getPairedShares : replaced return value with null for pl/zankowski/iextrading4j/api/marketdata/Auction::getPairedShares → KILLED |
return pairedShares; |
62 | } | |
63 | ||
64 | public BigDecimal getImbalanceShares() { | |
65 |
1
1. getImbalanceShares : replaced return value with null for pl/zankowski/iextrading4j/api/marketdata/Auction::getImbalanceShares → KILLED |
return imbalanceShares; |
66 | } | |
67 | ||
68 | public BigDecimal getReferencePrice() { | |
69 |
1
1. getReferencePrice : replaced return value with null for pl/zankowski/iextrading4j/api/marketdata/Auction::getReferencePrice → KILLED |
return referencePrice; |
70 | } | |
71 | ||
72 | public BigDecimal getIndicativePrice() { | |
73 |
1
1. getIndicativePrice : replaced return value with null for pl/zankowski/iextrading4j/api/marketdata/Auction::getIndicativePrice → KILLED |
return indicativePrice; |
74 | } | |
75 | ||
76 | public BigDecimal getAuctionBookPrice() { | |
77 |
1
1. getAuctionBookPrice : replaced return value with null for pl/zankowski/iextrading4j/api/marketdata/Auction::getAuctionBookPrice → KILLED |
return auctionBookPrice; |
78 | } | |
79 | ||
80 | public BigDecimal getCollarReferencePrice() { | |
81 |
1
1. getCollarReferencePrice : replaced return value with null for pl/zankowski/iextrading4j/api/marketdata/Auction::getCollarReferencePrice → KILLED |
return collarReferencePrice; |
82 | } | |
83 | ||
84 | public BigDecimal getLowerCollarPrice() { | |
85 |
1
1. getLowerCollarPrice : replaced return value with null for pl/zankowski/iextrading4j/api/marketdata/Auction::getLowerCollarPrice → KILLED |
return lowerCollarPrice; |
86 | } | |
87 | ||
88 | public BigDecimal getUpperCollarPrice() { | |
89 |
1
1. getUpperCollarPrice : replaced return value with null for pl/zankowski/iextrading4j/api/marketdata/Auction::getUpperCollarPrice → KILLED |
return upperCollarPrice; |
90 | } | |
91 | ||
92 | public BigDecimal getExtensionNumber() { | |
93 |
1
1. getExtensionNumber : replaced return value with null for pl/zankowski/iextrading4j/api/marketdata/Auction::getExtensionNumber → KILLED |
return extensionNumber; |
94 | } | |
95 | ||
96 | public LocalTime getStartTime() { | |
97 |
1
1. getStartTime : replaced return value with null for pl/zankowski/iextrading4j/api/marketdata/Auction::getStartTime → KILLED |
return startTime; |
98 | } | |
99 | ||
100 | public Long getLastUpdate() { | |
101 |
1
1. getLastUpdate : replaced Long return value with 0L for pl/zankowski/iextrading4j/api/marketdata/Auction::getLastUpdate → KILLED |
return lastUpdate; |
102 | } | |
103 | ||
104 | @Override | |
105 | public boolean equals(Object o) { | |
106 |
2
1. equals : negated conditional → KILLED 2. equals : replaced boolean return with false for pl/zankowski/iextrading4j/api/marketdata/Auction::equals → KILLED |
if (this == o) return true; |
107 |
3
1. equals : negated conditional → KILLED 2. equals : negated conditional → KILLED 3. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/marketdata/Auction::equals → KILLED |
if (o == null || getClass() != o.getClass()) return false; |
108 | Auction auction = (Auction) o; | |
109 |
2
1. equals : negated conditional → KILLED 2. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/marketdata/Auction::equals → KILLED |
return auctionType == auction.auctionType && |
110 |
1
1. equals : negated conditional → KILLED |
Objects.equal(pairedShares, auction.pairedShares) && |
111 |
1
1. equals : negated conditional → KILLED |
Objects.equal(imbalanceShares, auction.imbalanceShares) && |
112 |
1
1. equals : negated conditional → KILLED |
Objects.equal(referencePrice, auction.referencePrice) && |
113 |
1
1. equals : negated conditional → KILLED |
Objects.equal(indicativePrice, auction.indicativePrice) && |
114 |
1
1. equals : negated conditional → KILLED |
Objects.equal(auctionBookPrice, auction.auctionBookPrice) && |
115 |
1
1. equals : negated conditional → KILLED |
Objects.equal(collarReferencePrice, auction.collarReferencePrice) && |
116 |
1
1. equals : negated conditional → KILLED |
Objects.equal(lowerCollarPrice, auction.lowerCollarPrice) && |
117 |
1
1. equals : negated conditional → KILLED |
Objects.equal(upperCollarPrice, auction.upperCollarPrice) && |
118 |
1
1. equals : negated conditional → KILLED |
Objects.equal(extensionNumber, auction.extensionNumber) && |
119 |
1
1. equals : negated conditional → KILLED |
Objects.equal(startTime, auction.startTime) && |
120 |
1
1. equals : negated conditional → KILLED |
Objects.equal(lastUpdate, auction.lastUpdate); |
121 | } | |
122 | ||
123 | @Override | |
124 | public int hashCode() { | |
125 |
1
1. hashCode : replaced int return with 0 for pl/zankowski/iextrading4j/api/marketdata/Auction::hashCode → KILLED |
return Objects.hashCode(auctionType, pairedShares, imbalanceShares, referencePrice, |
126 | indicativePrice, auctionBookPrice, collarReferencePrice, lowerCollarPrice, | |
127 | upperCollarPrice, extensionNumber, startTime, lastUpdate); | |
128 | } | |
129 | ||
130 | @Override | |
131 | public String toString() { | |
132 |
1
1. toString : replaced return value with "" for pl/zankowski/iextrading4j/api/marketdata/Auction::toString → KILLED |
return MoreObjects.toStringHelper(this) |
133 | .add("auctionType", auctionType) | |
134 | .add("pairedShares", pairedShares) | |
135 | .add("imbalanceShares", imbalanceShares) | |
136 | .add("referencePrice", referencePrice) | |
137 | .add("indicativePrice", indicativePrice) | |
138 | .add("auctionBookPrice", auctionBookPrice) | |
139 | .add("collarReferencePrice", collarReferencePrice) | |
140 | .add("lowerCollarPrice", lowerCollarPrice) | |
141 | .add("upperCollarPrice", upperCollarPrice) | |
142 | .add("extensionNumber", extensionNumber) | |
143 | .add("startTime", startTime) | |
144 | .add("lastUpdate", lastUpdate) | |
145 | .toString(); | |
146 | } | |
147 | } | |
Mutations | ||
57 |
1.1 |
|
61 |
1.1 |
|
65 |
1.1 |
|
69 |
1.1 |
|
73 |
1.1 |
|
77 |
1.1 |
|
81 |
1.1 |
|
85 |
1.1 |
|
89 |
1.1 |
|
93 |
1.1 |
|
97 |
1.1 |
|
101 |
1.1 |
|
106 |
1.1 2.2 |
|
107 |
1.1 2.2 3.3 |
|
109 |
1.1 2.2 |
|
110 |
1.1 |
|
111 |
1.1 |
|
112 |
1.1 |
|
113 |
1.1 |
|
114 |
1.1 |
|
115 |
1.1 |
|
116 |
1.1 |
|
117 |
1.1 |
|
118 |
1.1 |
|
119 |
1.1 |
|
120 |
1.1 |
|
125 |
1.1 |
|
132 |
1.1 |