| 6 | class Result<T> {} |
| 7 | |
| 8 | public class DataProcessor extends BaseProcessor implements Processor { |
| 9 | private List<String> items; |
| 10 | |
| 11 | public DataProcessor() { |
| 12 | this.items = new ArrayList<>(); |
| 13 | } |
| 14 | |
| 15 | public void addItem(String item) { |
| 16 | items.add(item); |
| 17 | } |
| 18 | |
| 19 | public List<String> process() { |
| 20 | return validate(items); |
| 21 | } |
| 22 | |
| 23 | @Override |
| 24 | public Result<DataProcessor> build(HttpClient client) { |
| 25 | return null; |
| 26 | } |
| 27 | |
| 28 | private List<String> validate(List<String> data) { |
| 29 | List<String> result = new ArrayList<>(); |
| 30 | for (String s : data) { |
| 31 | if (s != null && !s.isEmpty()) { |
| 32 | result.add(s.trim()); |
| 33 | } |
| 34 | } |
| 35 | return result; |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | interface Processor { |
| 40 | List<String> process(); |
nothing calls this directly
no outgoing calls
no test coverage detected