「java」List配列(数値)の最大値・最小値を取得するコード

1.List<double[]>配列
List<double[]> values = new ArrayList<double[]>();
values.add(new double[] { 11.3, 15.5, 13.8, 16.8, 23.4, 24.4, 26.4, 25.1, 23.6, 34.3, 17.2,
13.9 });
values.add(new double[] { 10, 10, 12, 35, 20, 24, 26, 26, 23, 18, 14, 11 });
values.add(new double[] { 6, 5.3, 8, 32, 37, 22, 24.2, 24, 19, 15, 9, 6 });
values.add(new double[] { 27, 10, 31, 15, 39, 23, 34, 25, 56, 18, 13, 10 });

2.最大値(max value)
public double ListDoubleArrMaxVal(List<double[]> dataList) {
double max = Double.MIN_VALUE;
for (double[] ds : dataList) {
for (double d : ds) {
if (d > max) {
max = d;
}
}
}
return max;
}
3.最小値(min value)
public double ListDoubleArrMinVal(List<double[]> dataList) {
double min = Double.MAX_VALUE;
for (double[] ds : dataList) {
for (double d : ds) {
if (d < min) {
min = d;
}
}
}
return min;
}