public int getMinimumDifference_as_int(){
        int diff = 0;
        if(this.type==6 || this.type==7){
            ArrayMaths am = this.sort();
            int[] sorted = am.getArray_as_int();
            diff = sorted[1] - sorted[0];
            int minDiff = diff;
            for(int i=1; i<this.length-1; i++){
                diff = sorted[i+1] - sorted[i];
                if(diff<minDiff)minDiff = diff;
            }
        }
        else{
            throw new IllegalArgumentException("Minimum difference may only be returned as the same type as the type of the internal array - you are trying to return as int or Integer the difference for a " + this.typeName[this.type] +"[] array");
        }
        return diff;
    }