Search for the minimum element in the array.

@param intArray array that we are searching in.

@return the minimum element in the array.
557465
public static int searchMin(int[] intArray) {
        if(intArray.length == 0) {
            throw new IllegalArgumentException("The array you provided does not have any elements");
        }

        int min = intArray[0];

        for(int i = 1; i < intArray.length; i++) {
            if(intArray[i] < min) {
                min = intArray[i];
            }
        }

        return min;
    }
482258
public static <T extends Comparable<? super T>> T min(T[] numberArray) {
		if (isEmpty(numberArray)) {
			throw new IllegalArgumentException("Number array must not empty !");
		}
		T min = numberArray[0];
		for (int i = 0; i < numberArray.length; i++) {
			if (ObjectUtil.compare(min, numberArray[i]) > 0) {
				min = numberArray[i];
			}
		}
		return min;
	}
577934
public boolean isAfter(T element) {
    if (element == null) { return false; }
    return comparator.compare(element, min) < 0;
  }
1038740
public static byte searchMax(byte[] byteArray) {
        if(byteArray.length == 0) {
            throw new IllegalArgumentException("The array you provided does not have any elements");
        }

        byte max = byteArray[0];

        for(int i = 1; i < byteArray.length; i++) {
            if(byteArray[i] > max) {
                max = byteArray[i];
            }
        }

        return max;
    }
751312
public static final int nextInteger(int min, int max) {
		return min == max ? min : min + getRandom().nextInt(max - min);
	}
819565
@Nullable
  public static int[] getIntArray(@Nullable final JsonArray array) {
    if (null == array) return null;
    return IntStream.range(0, array.size()).map(i -> array.get(i).getAsInt()).toArray();
  }
718935
public static int intArrayGet(int[] a, int i) {
        try {
            return a[i];
        } catch (Throwable t) {
            return a[DefaultGroovyMethodsSupport.normaliseIndex(i,a.length)];
        }
    }
50152
public static int search(float[] floatArray, float value) { 
        int start = 0;
        int end = floatArray.length - 1;
        int middle = 0;
        
        while(start <= end) {
            middle = (start + end) >> 1;
        
            if(value == floatArray[middle]) {
                return middle;
            }
            
            if(value < floatArray[middle]) {
                end = middle - 1 ;
            }
            else {
                start = middle + 1;
            }
        }
                

        return -1;
    }
985408
public static <E extends Comparable<E>> void sort(E[] array) {
        int index = 0;
        E value = null;
        
        for(int i = 1; i < array.length; i++) {
            index = i;
            value = array[index];

            while(index > 0 && value.compareTo(array[index - 1]) < 0) {
                array[index] = array[index - 1];
                
                index--;
            }
            
            array[index] = value;
        }
    }
162285
public static int min(int a, final int b, final int c) {
        if (b < a) {
            a = b;
        }
        if (c < a) {
            a = c;
        }
        return a;
    }
962402
public static <E extends Comparable<E>> E searchMin(List<E> list) {
        if(list.size() == 0) {
            throw new IllegalArgumentException("The list you provided does not have any elements");
        }
        E min = list.get(0);
        for(int i = 1; i < list.size(); i++) {
            if(list.get(i).compareTo(min) < 0) {
                min = list.get(i);
            }
        }
        return min;
    }
126433
public static double min(double[][] values) {
    double min = Double.MAX_VALUE;
    for (int i = 0; i < values.length; i++) {
      for (int j = 0; j < values[i].length; j++) {
        min = (values[i][j] < min) ? values[i][j] : min;
      }
    }
    return min;
  }
1364239
@Pure
	public static int min(int... values) {
		if (values == null || values.length == 0) {
			return 0;
		}
		int min = values[0];
		for (final int v : values) {
			if (v < min) {
				min = v;
			}
		}
		return min;
	}
407681
public int findLowestKey(int min) {
        int lowest = Integer.MAX_VALUE;
        int index = index(hash(min));
        final int maxTry = capacity;
        for (int i = 0; i < maxTry; i++) {
            if (!slotIsFree(index)) {
                int k = keys[index];
                if (k == min) return min;
                if (min < k && k < lowest) lowest = k;
            }
            index = nextIndex(index);
        }
        return lowest;
    }
605991
public static int search(double[] doubleArray, double value) { 
        int start = 0;
        int end = doubleArray.length - 1;
        int middle = 0;
        
        while(start <= end) {
            middle = (start + end) >> 1;
        
            if(value == doubleArray[middle]) {
                return middle;
            }
            
            if(value < doubleArray[middle]) {
                end = middle - 1 ;
            }
            else {
                start = middle + 1;
            }
        }
                

        return -1;
    }
1024458
def get_min(array):
    
    smallest = np.inf
    for i in array:
        try:
            if i < smallest:
                smallest = i
        except:
            pass
    if np.isinf(smallest):
        raise ValueError("there's no numeric value in array!")
    else:
        return smallest
219387
public int min() {
    int min = Integer.MAX_VALUE;
    for (E key : map.keySet()) {
      min = Math.min(min, getIntCount(key));
    }
    return min;
  }