Java List Value Add All addArrayToList(String[] array, List list)

Here you can find the source of addArrayToList(String[] array, List list)

Description

add Array To List

License

Open Source License

Declaration

private static void addArrayToList(String[] array, List<String> list) 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) 2004, 2007 Actuate Corporation.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors://w w  w. ja  v a2s.  co  m
 *  Actuate Corporation  - initial API and implementation
 *******************************************************************************/

import java.util.List;

public class Main {
    private static void addArrayToList(String[] array, List<String> list) {
        for (int i = 0; i < array.length; i++) {
            list.add(array[i]);
        }
    }
}

Related

  1. addAllUniqueToList(List objects, List objectsToAdd)
  2. addAllWords(String text, List result)
  3. addArrayToList(List list, String as[])
  4. addArrayToList(List list, double[] array)
  5. addArrayToList(List list, T[] array)
  6. addArrayToList(T[] array, List list)
  7. addToList(List list, Object obj)
  8. addToList(List list, I item)
  9. AddToList(List tips, String tip)