public int[] GenerateArray(ArrayGeneratorParams agParams)
    {
        int[] localArray = new int[agParams.getSize()];
        Random rnd = new Random();
        
        switch (agParams.getType())
        {
            case RANDOM:
                for(int i = 0; i < agParams.getSize(); i++)
                {
                    localArray[i] = rnd.nextInt(Integer.MAX_VALUE);
                }
                break;
            case REVERSE:
                for(int i = 0; i < agParams.getSize(); i++)
                {
                    localArray[i] = rnd.nextInt(Integer.MAX_VALUE);
                }
                
                Arrays.sort(localArray);
                localArray = GapArrayGenerator.reverseArray(localArray);
                
                break;
            case FIVEDISTINCT:
                int[] distinctValues = new int[5];
                
                //build the distinct value array
                for(int i = 0; i < distinctValues.length; i++)
                {
                    distinctValues[i] = rnd.nextInt(Integer.MAX_VALUE);
                }

                //build the sort array using the distinct values
                for(int i = 0; i < agParams.getSize(); i++)
                {
                    localArray[i] = distinctValues[rnd.nextInt(5)];
                }
                break;
        }
        return localArray;
    }