Here you can find the source of anyNotNull(Object... tests)
public static boolean anyNotNull(Object... tests)
//package com.java2s; //License from project: Open Source License public class Main { /**/*from ww w . j av a 2 s . c o m*/ * Returns true if any value in the passed array is non-null */ public static boolean anyNotNull(Object... tests) { return coalesce(tests) != null; } /** * Returns the first non-null value in the passed array */ public static <T extends Object> T coalesce(T... tests) { if (tests != null) { for (int i = 0; i < tests.length; i++) { if (notNull(tests[i])) { return tests[i]; } } } return null; } /** * Returns true if object is not null and not empty string */ public static boolean notNull(Object o) { return !isNull(o); } /** * Returns true if object is null or empty String */ public static boolean isNull(Object o) { return o == null || o.equals(""); } }