Here you can find the source of asList(Object info)
private static List<Number> asList(Object info)
//package com.java2s; import java.util.ArrayList; import java.util.List; public class Main { private static List<Number> asList(Object info) { List<Number> list = new ArrayList<Number>(); if (info instanceof int[]) { int[] array = (int[]) info; for (int i : array) { list.add(i);//w ww.j a v a2s . c o m } } else if (info instanceof long[]) { long[] array = (long[]) info; for (long i : array) { list.add(i); } } else if (info instanceof float[]) { float[] array = (float[]) info; for (float i : array) { list.add(i); } } else if (info instanceof double[]) { double[] array = (double[]) info; for (double i : array) { list.add(i); } } return list; } }