/** * Copyright (c): Uwe Schmidt, FH Wedel * * You may study, modify and distribute this source code * FOR NON-COMMERCIAL PURPOSES ONLY. * This copyright message has to remain unchanged. * * Note that this document is provided 'as is', * WITHOUT WARRANTY of any kind either expressed or implied. */ /** * * f(n) = c * f1(n) */ //-------------------- public class Scale extends Sequence { private long factor; private Sequence s; public Scale(long factor, Sequence s) { this.factor = factor; this.s = s; } public long next() { return factor * s.next(); } } //--------------------