| 1 | package pl.zankowski.iextrading4j.api.stocks; | |
| 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 | ||
| 11 | public class Ohlc implements Serializable { | |
| 12 | ||
| 13 | private static final long serialVersionUID = -7796960089826811278L; | |
| 14 | ||
| 15 | private final String symbol; | |
| 16 | private final Point open; | |
| 17 | private final Point close; | |
| 18 | private final BigDecimal high; | |
| 19 | private final BigDecimal low; | |
| 20 | private final BigDecimal volume; | |
| 21 | ||
| 22 | @JsonCreator | |
| 23 | public Ohlc( | |
| 24 | @JsonProperty("symbol") final String symbol, | |
| 25 | @JsonProperty("open") final Point open, | |
| 26 | @JsonProperty("close") final Point close, | |
| 27 | @JsonProperty("high") final BigDecimal high, | |
| 28 | @JsonProperty("low") final BigDecimal low, | |
| 29 | @JsonProperty("volume") final BigDecimal volume) { | |
| 30 | this.symbol = symbol; | |
| 31 | this.open = open; | |
| 32 | this.close = close; | |
| 33 | this.high = high; | |
| 34 | this.low = low; | |
| 35 | this.volume = volume; | |
| 36 | } | |
| 37 | ||
| 38 | public String getSymbol() { | |
| 39 |
1
1. getSymbol : replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/Ohlc::getSymbol → KILLED |
return symbol; |
| 40 | } | |
| 41 | ||
| 42 | public Point getOpen() { | |
| 43 |
1
1. getOpen : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/Ohlc::getOpen → KILLED |
return open; |
| 44 | } | |
| 45 | ||
| 46 | public Point getClose() { | |
| 47 |
1
1. getClose : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/Ohlc::getClose → KILLED |
return close; |
| 48 | } | |
| 49 | ||
| 50 | public BigDecimal getHigh() { | |
| 51 |
1
1. getHigh : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/Ohlc::getHigh → KILLED |
return high; |
| 52 | } | |
| 53 | ||
| 54 | public BigDecimal getLow() { | |
| 55 |
1
1. getLow : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/Ohlc::getLow → KILLED |
return low; |
| 56 | } | |
| 57 | ||
| 58 | public BigDecimal getVolume() { | |
| 59 |
1
1. getVolume : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/Ohlc::getVolume → KILLED |
return volume; |
| 60 | } | |
| 61 | ||
| 62 | @Override | |
| 63 | public boolean equals(final Object o) { | |
| 64 |
1
1. equals : negated conditional → KILLED |
if (this == o) { |
| 65 |
1
1. equals : replaced boolean return with false for pl/zankowski/iextrading4j/api/stocks/Ohlc::equals → KILLED |
return true; |
| 66 | } | |
| 67 |
2
1. equals : negated conditional → KILLED 2. equals : negated conditional → KILLED |
if (o == null || getClass() != o.getClass()) { |
| 68 |
1
1. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/stocks/Ohlc::equals → KILLED |
return false; |
| 69 | } | |
| 70 | final Ohlc ohlc = (Ohlc) o; | |
| 71 |
2
1. equals : negated conditional → KILLED 2. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/stocks/Ohlc::equals → KILLED |
return Objects.equal(symbol, ohlc.symbol) && |
| 72 |
1
1. equals : negated conditional → KILLED |
Objects.equal(open, ohlc.open) && |
| 73 |
1
1. equals : negated conditional → KILLED |
Objects.equal(close, ohlc.close) && |
| 74 |
1
1. equals : negated conditional → KILLED |
Objects.equal(high, ohlc.high) && |
| 75 |
1
1. equals : negated conditional → KILLED |
Objects.equal(low, ohlc.low) && |
| 76 |
1
1. equals : negated conditional → KILLED |
Objects.equal(volume, ohlc.volume); |
| 77 | } | |
| 78 | ||
| 79 | @Override | |
| 80 | public int hashCode() { | |
| 81 |
1
1. hashCode : replaced int return with 0 for pl/zankowski/iextrading4j/api/stocks/Ohlc::hashCode → KILLED |
return Objects.hashCode(symbol, open, close, high, low, volume); |
| 82 | } | |
| 83 | ||
| 84 | @Override | |
| 85 | public String toString() { | |
| 86 |
1
1. toString : replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/Ohlc::toString → KILLED |
return MoreObjects.toStringHelper(this) |
| 87 | .add("symbol", symbol) | |
| 88 | .add("open", open) | |
| 89 | .add("close", close) | |
| 90 | .add("high", high) | |
| 91 | .add("low", low) | |
| 92 | .add("volume", volume) | |
| 93 | .toString(); | |
| 94 | } | |
| 95 | ||
| 96 | } | |
Mutations | ||
| 39 |
1.1 |
|
| 43 |
1.1 |
|
| 47 |
1.1 |
|
| 51 |
1.1 |
|
| 55 |
1.1 |
|
| 59 |
1.1 |
|
| 64 |
1.1 |
|
| 65 |
1.1 |
|
| 67 |
1.1 2.2 |
|
| 68 |
1.1 |
|
| 71 |
1.1 2.2 |
|
| 72 |
1.1 |
|
| 73 |
1.1 |
|
| 74 |
1.1 |
|
| 75 |
1.1 |
|
| 76 |
1.1 |
|
| 81 |
1.1 |
|
| 86 |
1.1 |