Here you can find the source of arrayToArrayList(Object[] array)
Parameter | Description |
---|---|
array | An array |
public static ArrayList arrayToArrayList(Object[] array)
//package com.java2s; /*L/*from www . j av a2 s.c o m*/ * Copyright RTI International * * Distributed under the OSI-approved BSD 3-Clause License. * See http://ncip.github.com/webgenome/LICENSE.txt for details. */ import java.util.ArrayList; public class Main { /** * Convert array into list * @param array An array * @return A list containing contents of array */ public static ArrayList arrayToArrayList(Object[] array) { ArrayList list = new ArrayList(); if (array != null) for (int i = 0; i < array.length; i++) list.add(array[i]); return list; } }