1
2
3
4
5
6
7
8
9
10public
11class IntegerSum
12 extends Accumulate <Integer, Integer> {
13
14
15
16
17
18 private
19 int result = 0;
20
21
22
23 public
24 void process(Integer element)
25 {
26
27 result += element;
28 }
29
30
31
32 public
33 Integer getResult()
34 {
35
36 return
37 result;
38 }
39}
40