Here you can find the source of addListNotNullValue(List
public static <V> boolean addListNotNullValue(List<V> sourceList, V value)
//package com.java2s; /**//from ww w . jav a2s . c om * Copyright (c) 2014 http://www.lushapp.wang * * Licensed under the Apache License, Version 2.0 (the "License"); */ import java.util.List; public class Main { public static <V> boolean addListNotNullValue(List<V> sourceList, V value) { return (sourceList != null && value != null) ? sourceList.add(value) : false; } }