Java List Create createList(T... objs)

Here you can find the source of createList(T... objs)

Description

create List

License

Open Source License

Declaration

@SuppressWarnings("unchecked")
public static <T> List<T> createList(T... objs) 

Method Source Code

//package com.java2s;
/**//  w ww. j av  a 2s .  c  om
 * @(#)CollectionUtils.java   V1.0.0 2015-8-13 ????5:02:10
 *
 * Copyright 2015 www.ifood517.com. All rights reserved.
 * www.ifood517.com PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */

import java.util.ArrayList;

import java.util.List;

public class Main {

    @SuppressWarnings("unchecked")
    public static <T> List<T> createList(T... objs) {
        List<T> list = new ArrayList<T>();
        if (objs != null) {
            for (T t : objs) {
                list.add(t);
            }

        }
        return list;
    }
}

Related

  1. createList(T... _entries)
  2. createList(T... array)
  3. createList(T... element)
  4. createList(T... items)
  5. createList(T... items)
  6. createList(T... params)
  7. createListFrom(String... array)
  8. createListFromCollection(Collection collection)
  9. createListFromCommaDelimitedString(String access)