Java ArrayList Max getMaxValue(ArrayList values)

Here you can find the source of getMaxValue(ArrayList values)

Description

get Max Value

License

Open Source License

Declaration

public static double getMaxValue(ArrayList<Double> values) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.util.ArrayList;

public class Main {
    public static double getMaxValue(ArrayList<Double> values) {
        if (values.isEmpty()) {
            return -1.0;
        }//from w  ww .  jav a  2  s.  c o  m

        double max = -1.0;
        for (Double value : values) {
            if (max < value) {
                max = value;
            }
        }

        return max;
    }
}

Related

  1. getMax(ArrayList noise)
  2. getMaxEntryLength(ArrayList> dArr)
  3. getMaxOfArrayListInteger(List integerList)
  4. getMaxString(ArrayList labels, int currindx)
  5. Max(ArrayList> data)
  6. Max(ArrayList values)
  7. maxEltsInOneSetOfValues(ArrayList values)
  8. maxInColumns(ArrayList lines)