package org.roi.itlab.cassandra.random_attributes;

/**
 * author Anush
 * author Vadim
 */
public abstract class RandomGeneratorBuilder {
    protected RandomGenerator randomGenerator;

    public RandomGeneratorBuilder()
    {
        randomGenerator = new RandomGenerator();
    }
    public RandomGenerator getRandomGenerator() {
        return randomGenerator;
    }

    public abstract void buildGenerator();

    public int getMaxValue(double[] array) {
        double maxValue = array[0];
        for (int i = 1; i < array.length; i++) {
            if (array[i] > maxValue) {
                maxValue = array[i];
            }
        }
        return (int)maxValue+1;
    }

}

@@ -414,275 +414,6 @@
 );%0A%0A
-    public int getMaxValue(double%5B%5D array) %7B%0A        double maxValue = array%5B0%5D;%0A        for (int i = 1; i %3C array.length; i++) %7B%0A            if (array%5Bi%5D %3E maxValue) %7B%0A                maxValue = array%5Bi%5D;%0A            %7D%0A        %7D%0A        return (int)maxValue+1;%0A    %7D%0A%0A
 %7D%0A

remove dublicate code