Java Collection Min min(Collection list)

Here you can find the source of min(Collection list)

Description

min

License

Apache License

Declaration

public static Number min(Collection<Number> list) 

Method Source Code


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

import java.util.Collection;

public class Main {
    public static Number min(Collection<Number> list) {
        Number min = list.iterator().next();
        for (Number item : list) {
            if (item.floatValue() < min.floatValue()) {
                min = item;//from www  .j  av  a 2s. co m
            }
        }
        return min;
    }
}

Related

  1. min(Collection coll)
  2. min(Collection data)
  3. min(Collection doubles)
  4. min(Collection values)
  5. min(Collection a)
  6. min(Collection strs)
  7. min(Collection col)
  8. min(Collection elems)
  9. min(Collection values)