package com.hithomelabs.clients.Benchmarks.Sortables;

import com.hithomelabs.clients.Benchmarks.Sortable;
import com.hithomelabs.princeton1.common.Apple;

import java.util.Random;

public class RandomlySizedApples implements Sortable<Apple> {

    Apple[] apples;
    Random random;

    public RandomlySizedApples(int size, int sizeRange){
        random = new Random();
        apples = new Apple[size];
        for (int i = 0; i < size; i++)
            apples[i] = new Apple(random.nextInt(sizeRange));
    }


    @Override
    public Apple[] getArray() {
        return apples.clone();
    }

    @Override
    public String getOrdering() {
        return "RANDOMLY ORDERED";
    }
}
