blob: c83f9ca94c0b796943fe8b5b9635de6656c531c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
package imaging.filters;
/**
* A simple assertion mechanism for asserting validity of
* arguments.<p>
*
* @version 1.0, Apr 1 1996
* @author David Geary
*/
class Assert {
static public void notFalse(boolean b)
throws IllegalArgumentException {
if(b == false)
throw new IllegalArgumentException(
"boolean expression false");
}
static public void notNull(Object obj)
throws IllegalArgumentException {
if(obj == null)
throw new IllegalArgumentException("null argument");
}
static public void notFalse(boolean b, String s)
throws IllegalArgumentException {
if(b == false)
throw new IllegalArgumentException(s);
}
static public void notNull(Object obj, String s)
throws IllegalArgumentException {
if(obj == null)
throw new IllegalArgumentException(s);
}
}
|