MCPcopy Index your code
hub / github.com/BruceEckel/OnJava8-Examples / process

Method process

generics/ThrowGenericException.java:43–53  ·  view source on GitHub ↗
(List<Integer> resultCollector)

Source from the content-addressed store, hash-verified

41implements Processor<Integer, Failure2> {
42 static int count = 2;
43 @Override
44 public void process(List<Integer> resultCollector)
45 throws Failure2 {
46 if(count-- == 0)
47 resultCollector.add(47);
48 else {
49 resultCollector.add(11);
50 }
51 if(count < 0)
52 throw new Failure2();
53 }
54}
55
56public class ThrowGenericException {

Callers

nothing calls this directly

Calls 1

addMethod · 0.45

Tested by

no test coverage detected