Search for the minimum element in the array.

@param longArray array that we are searching in.

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

        long min = longArray[0];

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

        return min;
    }
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;
    }
658928
public static long max(long... numberArray) {
		if (isEmpty(numberArray)) {
			throw new IllegalArgumentException("Number array must not empty !");
		}
		long max = numberArray[0];
		for (int i = 0; i < numberArray.length; i++) {
			if (max < numberArray[i]) {
				max = numberArray[i];
			}
		}
		return max;
	}
869650
public static double searchMax(double[] doubleArray) {
        if(doubleArray.length == 0) {
            throw new IllegalArgumentException("The array you provided does not have any elements");
        }

        double max = doubleArray[0];

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

        return max;
    }
1175751
@SafeVarargs
    public static char min(final char... a) {
        N.checkArgNotNullOrEmpty(a, "The spcified array 'a' can not be null or empty");

        if (N.isNullOrEmpty(a)) {
            throw new IllegalArgumentException("The length of array can not be null or empty");
        }

        return min(a, 0, a.length);
    }
956792
public static <T> Level0ArrayOperator<Long[],Long> onArrayFor(final Long... elements) {
        return onArrayOf(Types.LONG, VarArgsUtil.asRequiredObjectArray(elements));
    }
609439
@Override
  public long[] toArray() {
    long cardinality = this.getLongCardinality();
    if (cardinality > Integer.MAX_VALUE) {
      throw new IllegalStateException("The cardinality does not fit in an array");
    }

    final long[] array = new long[(int) cardinality];

    int pos = 0;
    LongIterator it = getLongIterator();

    while (it.hasNext()) {
      array[pos++] = it.next();
    }
    return array;
  }
483956
public static char searchMin(char[] charArray) {
        if(charArray.length == 0) {
            throw new IllegalArgumentException("The array you provided does not have any elements");
        }

        char min = charArray[0];

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

        return min;
    }
628624
public static float searchMin(float[] floatArray) {
        if(floatArray.length == 0) {
            throw new IllegalArgumentException("The array you provided does not have any elements");
        }

        float min = floatArray[0];

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

        return min;
    }
1195975
private String getLongestString(String[] array) {
        int maxLength = 0;
        String longestString = null;
        for (String s : array) {
            if (s.length() > maxLength) {
                maxLength = s.length();
                longestString = s;
            }
        }
        return longestString;
    }
1332953
public static int min(IntArrayND array)
    {
        return array.stream().parallel().reduce(
            Integer.MAX_VALUE, Math::min);
    }
965480
public static <E extends Comparable<E>> E searchMax(E[] array) {
        if(array.length == 0) {
            throw new IllegalArgumentException("The array you provided does not have any elements");
        }
        E max = array[0];
        for(int i = 1; i < array.length; i++) {
            if(array[i].compareTo(max) > 0 ) {
                max = array[i];
            }
        }
        return max;
    }
1094727
public long[] getLongArray(final String key, final long[] def) {
		try {
			final long[] result = getLongArray(key);
			return result != null ? result : def;
		} catch (final NumberFormatException nfe) {
			return def;
		}
	}
898662
@Override
	public long[] toArrayLong() {
		long[] result = new long[size];
		System.arraycopy(elementData, 0, result, 0, size);
		return result;
	}
244377
public static int search(short[] shortArray, short value) { 
        int start = 0;
        int end = shortArray.length - 1;
        int middle = 0;
        
        while(start <= end) {
            middle = (start + end) >> 1;
        
            if(value == shortArray[middle]) {
                return middle;
            }
            
            if(value < shortArray[middle]) {
                end = middle - 1 ;
            }
            else {
                start = middle + 1;
            }
        }
                

        return -1;
    }
1168343
public long getLong(int index, long def) {
        Object tmp = mArray.get(index);
        return tmp != null && tmp instanceof Number ? ((Number) tmp)
                .longValue() : def;
    }
327265
public static int search(int[] intArray, int value) { 
        int start = 0;
        int end = intArray.length - 1;
        int middle = 0;
        
        while(start <= end) {
            middle = (start + end) >> 1;
        
            if(value == intArray[middle]) {
                return middle;
            }
            
            if(value < intArray[middle]) {
                end = middle - 1 ;
            }
            else {
                start = middle + 1;
            }
        }
                

        return -1;
    }