1
2
3
4
5
6
7
8public
9class Scale extends Sequence {
10 private
11 long factor;
12
13 private
14 Sequence s;
15
16 public
17 Scale(long factor, Sequence s) {
18 this.factor = factor;
19 this.s = s;
20 }
21
22 public
23 long next() {
24 return
25 factor * s.next();
26 }
27}
28
29
30