public class Assert extends Object
This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.
Modifier and Type | Method and Description |
---|---|
static void |
check(boolean cond)
Equivalent to
assert cond;
|
static void |
check(boolean cond,
int value)
Equivalent to
assert cond : value;
|
static void |
check(boolean cond,
long value)
Equivalent to
assert cond : value;
|
static void |
check(boolean cond,
Object value)
Equivalent to
assert cond : value;
|
static void |
check(boolean cond,
String msg)
Equivalent to
assert cond : value;
|
static <T> T |
checkNonNull(T t)
Equivalent to
assert (t != null); return t;
|
static <T> T |
checkNonNull(T t,
String msg)
Equivalent to
assert (o != null) : value;
|
static void |
checkNull(Object o)
Equivalent to
assert (o == null);
|
static void |
checkNull(Object o,
Object value)
Equivalent to
assert (o == null) : value;
|
static void |
checkNull(Object o,
String msg)
Equivalent to
assert (o == null) : value;
|
static void |
error()
Equivalent to
assert false;
|
static void |
error(String msg)
Equivalent to
assert false : msg;
|
public static void check(boolean cond)
public static void checkNull(Object o)
public static <T> T checkNonNull(T t)
public static void check(boolean cond, int value)
public static void check(boolean cond, long value)
public static void check(boolean cond, Object value)
public static void check(boolean cond, String msg)
public static void checkNull(Object o, Object value)
public static void checkNull(Object o, String msg)
public static <T> T checkNonNull(T t, String msg)
public static void error()
public static void error(String msg)
Copyright © 2016. All rights reserved.