Java examples for java.util:List Convert
Convert an aggregate list of objects into a List
//package com.java2s; import java.util.ArrayList; import java.util.List; public class Main { /**/* w ww . j a v a 2s. c om*/ * Convert an aggregate list of objects into a List */ public static <T> List<T> getAggregate(T... objects) { List<T> objs = new ArrayList<T>(); if (objects != null) { for (T obj : objects) { objs.add(obj); } } return objs; } }