MCPcopy Index your code
hub / github.com/Graphify-Labs/graphify / DataProcessor

Class DataProcessor

tests/fixtures/sample.java:8–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6class Result<T> {}
7
8public 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
39interface Processor {
40 List<String> process();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected