Here you can find the source of getMaxOfAList(List
Parameter | Description |
---|---|
list | a parameter |
public static double getMaxOfAList(List<Double[]> list)
//package com.java2s; //License from project: Apache License import java.util.Arrays; import java.util.List; public class Main { /**/*from w w w. ja v a2 s. c om*/ * Get the maximum double of a list of array of doubles * * @param list * @return maximum double */ public static double getMaxOfAList(List<Double[]> list) { double max = 0; for (Double[] doubles : list) { Arrays.sort(doubles); double tempMax = doubles[doubles.length - 1]; if (tempMax > max) { max = tempMax; } } return max; } }