| 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.util.List; | |
| 10 | ||
| 11 | import static pl.zankowski.iextrading4j.api.util.ListUtil.immutableList; | |
| 12 | ||
| 13 | public class Relevant implements Serializable { | |
| 14 | ||
| 15 | private static final long serialVersionUID = -6942948119327901276L; | |
| 16 | ||
| 17 | private final Boolean peers; | |
| 18 | private final List<String> symbols; | |
| 19 | ||
| 20 | @JsonCreator | |
| 21 | public Relevant( | |
| 22 | @JsonProperty("peers") final Boolean peers, | |
| 23 | @JsonProperty("symbols") final List<String> symbols) { | |
| 24 | this.peers = peers; | |
| 25 | this.symbols = immutableList(symbols); | |
| 26 | } | |
| 27 | ||
| 28 | public Boolean isPeers() { | |
| 29 |
2
1. isPeers : replaced Boolean return with True for pl/zankowski/iextrading4j/api/stocks/Relevant::isPeers → SURVIVED 2. isPeers : replaced Boolean return with False for pl/zankowski/iextrading4j/api/stocks/Relevant::isPeers → KILLED |
return peers; |
| 30 | } | |
| 31 | ||
| 32 | public List<String> getSymbols() { | |
| 33 |
1
1. getSymbols : replaced return value with Collections.emptyList for pl/zankowski/iextrading4j/api/stocks/Relevant::getSymbols → KILLED |
return symbols; |
| 34 | } | |
| 35 | ||
| 36 | @Override | |
| 37 | public boolean equals(Object o) { | |
| 38 |
2
1. equals : negated conditional → KILLED 2. equals : replaced boolean return with false for pl/zankowski/iextrading4j/api/stocks/Relevant::equals → KILLED |
if (this == o) return true; |
| 39 |
3
1. equals : negated conditional → KILLED 2. equals : negated conditional → KILLED 3. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/stocks/Relevant::equals → KILLED |
if (o == null || getClass() != o.getClass()) return false; |
| 40 | Relevant relevant = (Relevant) o; | |
| 41 |
2
1. equals : negated conditional → KILLED 2. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/stocks/Relevant::equals → KILLED |
return Objects.equal(peers, relevant.peers) && |
| 42 |
1
1. equals : negated conditional → KILLED |
Objects.equal(symbols, relevant.symbols); |
| 43 | } | |
| 44 | ||
| 45 | @Override | |
| 46 | public int hashCode() { | |
| 47 |
1
1. hashCode : replaced int return with 0 for pl/zankowski/iextrading4j/api/stocks/Relevant::hashCode → KILLED |
return Objects.hashCode(peers, symbols); |
| 48 | } | |
| 49 | ||
| 50 | @Override | |
| 51 | public String toString() { | |
| 52 |
1
1. toString : replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/Relevant::toString → KILLED |
return MoreObjects.toStringHelper(this) |
| 53 | .add("peers", peers) | |
| 54 | .add("symbols", symbols) | |
| 55 | .toString(); | |
| 56 | } | |
| 57 | } | |
Mutations | ||
| 29 |
1.1 2.2 |
|
| 33 |
1.1 |
|
| 38 |
1.1 2.2 |
|
| 39 |
1.1 2.2 3.3 |
|
| 41 |
1.1 2.2 |
|
| 42 |
1.1 |
|
| 47 |
1.1 |
|
| 52 |
1.1 |