Here you can find the source of assertAllAreNull(String messageIfNull, Object... objects)
Parameter | Description |
---|---|
messageIfNull | message. |
objects | objects. |
Parameter | Description |
---|---|
IllegalArgumentException | if any object provided was NOT null. |
public static void assertAllAreNull(String messageIfNull, Object... objects)
//package com.java2s; //License from project: Amazon Software License public class Main { /**/*from w w w. j av a2s . c o m*/ * Asserts that all of the objects are null. * @param messageIfNull message. * @param objects objects. * @throws IllegalArgumentException if any object provided was NOT null. */ public static void assertAllAreNull(String messageIfNull, Object... objects) { for (final Object object : objects) { if (object != null) { throw new IllegalArgumentException(messageIfNull); } } } }