package framework.generators;

/**
 * Abstract class to represent a wave generator.
 */
public abstract class Generator {
    /**
     * Generates the signal with the given frequency and duration.
     * @param  f  the frequency of the sample in hertzs
     * @param  d  the duration of the sample in seconds
     * @param  a  the amplitude of the sample
     * @return    the generated sample as an array of Doubles
     */
    public abstract Double[] generate(Double f, Double d, Double a);

    /**
     * Get the prototypes of the generators.
     * @return an array containing prototypes
     */
    public static Generator[] getPrototypes() {
        Generator[] prototypes = new Generator[4];
        prototypes[0] = new SineGenerator();
        prototypes[1] = new SquareGenerator();
        prototypes[2] = new SawtoothGenerator();
        prototypes[3] = new TriangleGenerator();

        return prototypes;
    }

    public abstract String toString();

    // Constants
    public static final int SAMPLE_RATE   = 44100;    // CD quality audio
}
@@ -492,439 +492,8 @@
 );%0A%0A
-    /**%0A     * Get the prototypes of the generators.%0A     * @return an array containing prototypes%0A     */%0A    public static Generator%5B%5D getPrototypes() %7B%0A        Generator%5B%5D prototypes = new Generator%5B4%5D;%0A        prototypes%5B0%5D = new SineGenerator();%0A        prototypes%5B1%5D = new SquareGenerator();%0A        prototypes%5B2%5D = new SawtoothGenerator();%0A        prototypes%5B3%5D = new TriangleGenerator();%0A%0A        return prototypes;%0A    %7D%0A%0A
     

Remove previous attempt of prototyping in Generator class.