* @return a random BigDecimal between 0 and 1 inclusive which can have up
     * to decimalPlaces number of decimal places
     */
    public static BigDecimal getRandom(
            Generic_Number a_Generic_Number,
            int decimalPlaces) {
        //Generic_BigDecimal a_Generic_BigDecimal = new Generic_BigDecimal();
        Random[] random = a_Generic_Number.get_RandomArrayMinLength(
                decimalPlaces);
        //System.out.println("Got Random[] size " + random.length);
        String value = "0.";
        int digit;
        int ten_int = 10;
        for (int i = 0; i < decimalPlaces; i++) {
            digit = random[i].nextInt(ten_int);
            value += digit;
        }
        int length = value.length();
        // Tidy values ending with zero's
        while (value.endsWith("0")) {
            length--;
            value = value.substring(0, length);
        }
        if (value.endsWith(".")) {
            value = "0";
        }
        BigDecimal result = new BigDecimal(value);
        //result.stripTrailingZeros();
        return result;
    }