Here you can find the source of asList(double[] array)
public static List<Double> asList(double[] array)
//package com.java2s; /*// ww w. java2 s . c o m * Copyright 2015-16, Yahoo! Inc. * Licensed under the terms of the Apache License 2.0. See LICENSE file at the project root for terms. */ import java.util.ArrayList; import java.util.List; public class Main { public static List<Double> asList(double[] array) { List<Double> list = new ArrayList<Double>(array.length); for (int i = 0; i < array.length; i++) list.add(array[i]); return list; } public static List<Float> asList(float[] array) { List<Float> list = new ArrayList<Float>(array.length); for (int i = 0; i < array.length; i++) list.add(array[i]); return list; } public static List<Long> asList(long[] array) { List<Long> list = new ArrayList<Long>(array.length); for (int i = 0; i < array.length; i++) list.add(array[i]); return list; } }