| 1 | package pl.zankowski.iextrading4j.client.sse.request; | |
| 2 | ||
| 3 | import java.util.Arrays; | |
| 4 | import java.util.HashSet; | |
| 5 | import java.util.Set; | |
| 6 | ||
| 7 | import static java.util.stream.Collectors.joining; | |
| 8 | ||
| 9 | public abstract class AbstractSymbolSseRequestBuilder<R, B extends ISseRequestBuilder<R>> | |
| 10 | extends AbstractSseRequestBuilder<R, B> { | |
| 11 | ||
| 12 | protected static final String SYMBOL_PARAM = "symbols"; | |
| 13 | ||
| 14 | private Set<String> symbols = new HashSet<>(); | |
| 15 | ||
| 16 | protected Set<String> getSymbols() { | |
| 17 |
1
1. getSymbols : replaced return value with Collections.emptySet for pl/zankowski/iextrading4j/client/sse/request/AbstractSymbolSseRequestBuilder::getSymbols → NO_COVERAGE |
return symbols; |
| 18 | } | |
| 19 | ||
| 20 | protected String getSymbol() { | |
| 21 |
1
1. getSymbol : replaced return value with "" for pl/zankowski/iextrading4j/client/sse/request/AbstractSymbolSseRequestBuilder::getSymbol → KILLED |
return symbols.stream().collect(joining(",")); |
| 22 | } | |
| 23 | ||
| 24 | public B withSymbol(String symbol) { | |
| 25 | this.symbols.add(symbol); | |
| 26 |
1
1. withSymbol : replaced return value with null for pl/zankowski/iextrading4j/client/sse/request/AbstractSymbolSseRequestBuilder::withSymbol → KILLED |
return (B) this; |
| 27 | } | |
| 28 | ||
| 29 | public B withSymbols(String... symbols) { | |
| 30 | this.symbols.addAll(Arrays.asList(symbols)); | |
| 31 |
1
1. withSymbols : replaced return value with null for pl/zankowski/iextrading4j/client/sse/request/AbstractSymbolSseRequestBuilder::withSymbols → KILLED |
return (B) this; |
| 32 | } | |
| 33 | ||
| 34 | public B withAllSymbols() { | |
| 35 |
1
1. withAllSymbols : removed call to java/util/Set::clear → NO_COVERAGE |
this.symbols.clear(); |
| 36 | this.symbols.add("firehose"); | |
| 37 |
1
1. withAllSymbols : replaced return value with null for pl/zankowski/iextrading4j/client/sse/request/AbstractSymbolSseRequestBuilder::withAllSymbols → NO_COVERAGE |
return (B) this; |
| 38 | } | |
| 39 | ||
| 40 | } | |
Mutations | ||
| 17 |
1.1 |
|
| 21 |
1.1 |
|
| 26 |
1.1 |
|
| 31 |
1.1 |
|
| 35 |
1.1 |
|
| 37 |
1.1 |