Java List Value Add All addAll(List list, T... array)

Here you can find the source of addAll(List list, T... array)

Description

add All

License

Open Source License

Declaration

@SuppressWarnings("unchecked")
    public static <T> boolean addAll(List<T> list, T... array) 

Method Source Code

//package com.java2s;

import java.util.List;

public class Main {
    @SuppressWarnings("unchecked")
    public static <T> boolean addAll(List<T> list, T... array) {
        return addElements(list, array);
    }/*www  .ja  va  2s . c om*/

    public static <T> boolean addElements(List<T> list, T[] array) {
        boolean good = true;
        for (T obj : array) {
            good &= list.add(obj);
        }
        return good;
    }
}

Related

  1. addAll(int index, List list, T... array)
  2. addAll(List dest, List src)
  3. addAll(List fromList, List toList)
  4. addAll(List list, E[] elements)
  5. addAll(List list, String[] array)
  6. addAll(List src, T... args)
  7. addAll(List xs, Collection adds)
  8. addAll(Object[] array, List list)
  9. addAll(T[] array, List list)