View Javadoc

1   package cz.cuni.amis.utils;
2   
3   public class NullCheck {
4   	
5   	/**
6   	 * Throws {@link IllegalArgumentException} if obj == null. Used during the construction of the objects.
7   	 * @param obj
8   	 * @param name
9   	 */
10  	public static void check(Object obj, String name) {
11  		if (obj == null) throw new IllegalArgumentException("'" + name + "' can't be null");
12  	}
13  
14  }