New List and add values

@param values list values
@param <T>    list type
@return return array list
327598
@SafeVarargs
    public static <T> List<T> newLists(T... values) {
        if(null == values || values.length == 0){
            Assert.notNull(values, "values not is null.");
        }
        return Arrays.asList(values);
    }
1353832
public void add(ShortArrayList values) {
        ensureCapacity(size + values.size);
        for (int i=0; i<values.size; i++) {
            this.add(values.elements[i]);
        }
    }
1252348
public static <T extends Object> T[] insert (T[] values, T value, int index)
    {
        @SuppressWarnings("unchecked")
        T[] nvalues = (T[])Array.newInstance(values.getClass().getComponentType(), values.length+1);
        if (index > 0) {
            System.arraycopy(values, 0, nvalues, 0, index);
        }
        nvalues[index] = value;
        if (index < values.length) {
            System.arraycopy(values, index, nvalues, index+1, values.length-index);
        }
        return nvalues;
    }
434843
public static <T> List<T> makeList(T... items) {
    List<T> s = new ArrayList<T>(items.length);
    for (int i = 0; i < items.length; i++) {
      s.add(items[i]);
    }
    return s;
  }
1296359
public List<V> putValues(String name, List<V> values) {
        return super.put(name, values);
    }
192408
public static <T> List<T> createList(T... args) {
        ArrayList<T> newList = new ArrayList<T>();
        Collections.addAll(newList, args);
        return newList;
    }
1219734
public function addValues($values=array()) {
		return $this->_addOrSetValues($values, function(HtmlTD &$cell,$value){$cell->addValue($value);});
	}
240787
public Query addParameters(Object... values) {
        for (Object v : values) {
            if (v instanceof String) {
                addParameter((String) v);
            } else if (v instanceof Integer) {
                addParameter((Integer) v);
            } else if (v instanceof Long) {
                addParameter((Long) v);
            } else if(v instanceof Double) {
                addParameter((Double) v);
            } else if (v instanceof Boolean) {
                addParameter((Boolean) v);
            } else if (v instanceof Date) {
                addParameter((Date) v);
            } else if (v instanceof Timestamp) {
                addParameter((Timestamp) v);
            } else {
                throw new IllegalArgumentException(
                        "Type " + v.getClass().getName() + " is not supported by automatic property assignment");
            }
        }

        return this;
    }
1258301
public static <T> List<T> concat(List<List<T>> lists) {
        List<T> list = new ArrayList<T>();
        for (List<? extends T> l : lists) {
            list.addAll(l);
        }
        return list;
    }
72161
public static <T> Set<T> set(T... values) {
        return new HashSet<T>(Arrays.asList(values));
    }
701590
public ListOrdersResult withOrders(Order... values) {
        List<Order> list = getOrders();
        for (Order value : values) {
            list.add(value);
        }
        return this;
    }
518309
@SafeVarargs
	public static <T> LinkedList<T> newLinkedList(T... values) {
		return (LinkedList<T>) list(true, values);
	}
251650
public function add($values)
    {
        if (! is_array($values) && ! $values instanceof BaseCollection) {
            $values = func_get_args();
        }

        // Once we have made sure our input is an array of values, we will convert
        // them into value model objects (if no model instances are given). When
        // done we will just push all values into the current collection items.
        foreach ($values as $value) {
            $this->push($this->buildValue($value));
        }

        return $this;
    }
1183801
@SuppressWarnings({ "unchecked", "rawtypes" })
	public static List<Object> arrayAsList(Object value) {
		if (value instanceof List) {
			return (List<Object>) value;
		}
		List list = null;
		if (value instanceof int[]) {
			list = new ArrayList();
			int[] array = (int[]) value;
			for (int i : array) {
				list.add(i);
			}
		} else if (value instanceof short[]) {
			list = new ArrayList();
			short[] array = (short[]) value;
			for (short i : array) {
				list.add(i);
			}
		} else if (value instanceof char[]) {
			list = new ArrayList();
			char[] array = (char[]) value;
			for (char i : array) {
				list.add(i);
			}
		} else if (value instanceof byte[]) {
			list = new ArrayList();
			byte[] array = (byte[]) value;
			for (byte i : array) {
				list.add(i);
			}
		} else if (value instanceof long[]) {
			list = new ArrayList();
			long[] array = (long[]) value;
			for (long i : array) {
				list.add(i);
			}
		} else if (value instanceof double[]) {
			list = new ArrayList();
			double[] array = (double[]) value;
			for (double i : array) {
				list.add(i);
			}
		} else if (value instanceof float[]) {
			list = new ArrayList();
			float[] array = (float[]) value;
			for (float i : array) {
				list.add(i);
			}
		} else if (value instanceof boolean[]) {
			list = new ArrayList();
			boolean[] array = (boolean[]) value;
			for (boolean i : array) {
				list.add(i);
			}
		} else if (value.getClass().isArray()) {
			Object[] array = (Object[]) value;
			list = Arrays.asList(array);
		}
		return list;
	}
632920
public static EditableArray newArray( Collection<?> values ) {
        BasicArray array = new BasicArray(values.size());
        array.addAllValues(values);
        return new ArrayEditor(array, DEFAULT_FACTORY);
    }
630275
protected Object[] cast(Collection values) {
        Object[] res = new Object[values.size()];
        int i = 0;
        for (Object value : values) {
            res[i++] = cast(value);
        }
        return res;
    }
954603
public static <T> List<T> getList(final ContentValues[] values, final Class<T> klass) {
        final List<T> objects = new ArrayList<T>();
        for (int i = 0; i < values.length; i++) {
            final T object = getObject(values[i], klass);
            if (object != null) {
                objects.add(object);
            }
        }
        return objects;
    }