Here you can find the source of addAllIfAllValuesNotNull(List
public static <V> boolean addAllIfAllValuesNotNull(List<V> list, V[] values)
//package com.java2s; //License from project: Apache License import java.util.List; public class Main { public static <V> boolean addAllIfAllValuesNotNull(List<V> list, V[] values) { if (values == null) { return false; }// w w w . j a v a 2s . c om for (V value : values) { if (value == null) { return false; } } for (V value : values) { list.add(value); } return true; } }