public final class Preconditions extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
checkArgument(boolean valid,
String message) |
static <T> T |
checkNotNull(T o,
String name) |
public static <T> T checkNotNull(T o,
String name)
throws NullPointerException
o - the param to checkname - the name of the param for the error messageNullPointerException - if o is nullpublic static void checkArgument(boolean valid,
String message)
throws IllegalArgumentException
valid - whether the argument is validmessage - error message if the argument is not validIllegalArgumentException - if !validCopyright © 2014. All Rights Reserved.