public class Preconditions
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static void |
checkArgument(boolean condition,
java.lang.Object argument) |
static void |
checkArgument(boolean condition,
java.lang.String message) |
static void |
checkArgumentNotNull(java.lang.Object reference,
java.lang.String argumentName)
Throws
IllegalArgumentException with an appropriate message if the reference is null. |
static void |
checkNotNull(java.lang.Object reference) |
public static void checkArgumentNotNull(java.lang.Object reference,
java.lang.String argumentName)
IllegalArgumentException with an appropriate message if the reference is null.reference - the reference to be checkedargumentName - name of the argument that is being checked. The name used in the error message.public static void checkNotNull(java.lang.Object reference)
reference - The reference to be checkedjava.lang.NullPointerException - if the reference is nullpublic static void checkArgument(boolean condition,
java.lang.Object argument)
public static void checkArgument(boolean condition,
java.lang.String message)
Copyright © 2015. All Rights Reserved.