Here you can find the source of containsNull(Collection
Parameter | Description |
---|---|
args | a collection; can't be null |
public static boolean containsNull(Collection<Object> args)
//package com.java2s; /**//from w w w .jav a2 s.co m * Copyright (C) 2010-14 diirt developers. See COPYRIGHT.TXT * All rights reserved. Use is subject to license terms. See LICENSE.TXT */ import java.util.Collection; public class Main { /** * Checks whether the collection contains a null value. * * @param args a collection; can't be null * @return true if one of the value is null */ public static boolean containsNull(Collection<Object> args) { for (Object object : args) { if (object == null) { return true; } } return false; } }