Java Collection Min minI(Collection col)

Here you can find the source of minI(Collection col)

Description

min I

License

Apache License

Declaration

public static Integer minI(Collection<Integer> col) 

Method Source Code

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

import java.util.Collection;

public class Main {
    public static Integer minI(Collection<Integer> col) {
        if (col.isEmpty()) {
            return null;
        }//from   w  ww  .ja  va  2 s  .  c o m

        int min = Integer.MAX_VALUE;
        for (Integer integer : col) {
            if (integer < min) {
                min = integer;
            }
        }

        return min;
    }
}

Related

  1. min(Collection col)
  2. min(Collection elems)
  3. min(Collection values)
  4. min(Collection values)
  5. min(final Collection collection)
  6. minInt(Collection ints)
  7. minKmerLength(final Collection kmers)
  8. minOr(Collection values, T defaultVal)