Java Collection Find findMax(Collection vals)

Here you can find the source of findMax(Collection vals)

Description

find Max

License

Open Source License

Declaration

public static double findMax(Collection<Double> vals) 

Method Source Code

//package com.java2s;

import java.util.*;

public class Main {
    public static double findMax(Collection<Double> vals) {
        double max = Double.MIN_VALUE;

        for (double d : vals) {
            if (d > max)
                max = d;//from  w w  w  .j  a  va  2s. c  o m
        }

        return max;
    }
}

Related

  1. findCommonElementType(Collection collection)
  2. findCommonElementType(Collection collection)
  3. findCommonElementType(Collection collection)
  4. findCommonElementType(Collection collection)
  5. findMax(Collection vals)
  6. findMax(Iterable collection)
  7. findValueOfType(Collection collection, Class type)
  8. findValueOfType(Collection collection, Class type)
  9. isAnyIncludedIn(Collection findAnyOfThese, Collection inThisCollection)