?? assert.java
字號:
// package gjt;
/**
* 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);
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -