Java Array Min Value min(T first, T... others)

Here you can find the source of min(T first, T... others)

Description

min

License

Apache License

Declaration

@SafeVarargs
    public static <T extends Comparable<T>> T min(T first, T... others) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    @SafeVarargs
    public static <T extends Comparable<T>> T min(T first, T... others) {
        T result = first;// ww  w  .  ja va  2  s  .  c  o m

        for (T value : others) {
            if (value.compareTo(result) < 0) {
                result = value;
            }
        }

        return result;
    }
}

Related

  1. min(long[] array)
  2. min(long[] array)
  3. min(long[] array)
  4. min(Number... array)
  5. min(Number[] array)
  6. min(T... values)
  7. min(T[] args)
  8. min(T[] inputArray, int i, int i0)
  9. min_max_mean_stddev(long[] counts)