1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package net.sf.composite.util;
17
18 /***
19 * Assertions useful in the implementation of method argument checking.
20 *
21 * @author Matt Sgarlata
22 * @since Apr 18, 2005
23 */
24 public abstract class Assert {
25
26 public static void notNull(Object object, String parameterName) {
27 if (object == null) {
28 throw new IllegalArgumentException("You must supply a non-empty " + parameterName);
29 }
30 }
31
32 public static void notEmpty(Object object, String parameterName) {
33 if (object == null) {
34 throw new IllegalArgumentException("You must supply a non-empty " + parameterName);
35 }
36 }
37
38 }