Java List from Array convertArrayToList(List list, String[] strs)

Here you can find the source of convertArrayToList(List list, String[] strs)

Description

convert Array To List

License

Apache License

Declaration

public static List<String> convertArrayToList(List<String> list, String[] strs) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class Main {

    public static List<String> convertArrayToList(List<String> list, String[] strs) {
        if (null == strs) {
            return new ArrayList<String>(50);
        }// w  w w.j av  a  2  s.c om

        if (null == list) {
            list = new ArrayList<String>(50);
        }
        list.addAll(Arrays.asList(strs));
        return list;
    }
}

Related

  1. asList(T[] array)
  2. asList(T[] array)
  3. asList(T[] array)
  4. asListFromObjectArray(Object[] at)
  5. convertArrayToList(int[] ids)
  6. convertArrayToList(Object value)
  7. convertArrayToList(Object[] objects)
  8. convertArrayToList(Object[] source)
  9. convertArrayToList(String[] array)