| Modifier and Type | Field and Description |
|---|---|
| public static final String |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static void | checkArgument(boolean
a boolean expression expression, String a template for the exception message should the check fail. The
message is formed by calling errorMessageTemplate, Object... String#format(String, Object. with the given parameters.the arguments to be substituted into the message template. errorMessageArgs)Ensures the truth of an expression involving one or more parameters to the calling method. |
| public static void | checkArgument(boolean
a boolean expression expression, Supplier<String> a supplier to build the error message in case of failure. Must not be null. errorMessage)Ensures the truth of an expression using a supplier to fetch the error message in case of a failure. |
| public static < the type of the reference to check. T> T | Returns: the non-null reference that was validated.the given object reference. reference)
Deprecated
use
Verifies that the given object reference is not java. instead.
null.
|
| public static < the type of the reference to check. T> T | Returns: the non-null reference that was validated.the given object reference. reference, String error message in case of null reference. message)
Deprecated
use
Verifies that the given object reference is not java. instead.
null.
|
| public static < the type of the FilterOperator to check. T> void | checkNotNull(FilterOperator<T>
the given filterOperator)FilterOperator reference.Verifies that the given |
| public static CharSequence | Returns: the validatedCharSequence.the given s)CharSequence.Verifies that the given |
| public static CharSequence | Returns: the validatedCharSequence.the given s, String CharSequence.error message in case of empty message)String.Verifies that the given |
| public static < the type of elements of the array. T> T[] | Returns: the validated array.the given array. array)Verifies that the given array is not |
| public static void | checkState(boolean
a boolean expression expression, String a template for the exception message should the check fail.The
message is formed by calling errorMessageTemplate, Object... String#format(String, Object. with the given parameters.the arguments to be substituted into the message template. Arguments
are converted to strings using errorMessageArgs)String#valueOf(Object).Ensures the truth of an expression involving the state of the calling instance, but not involving any parameters to the calling method. |
| private static void | |
| private static void |
| ARGUMENT_EMPTY | back to summary |
|---|---|
| public static final String ARGUMENT_EMPTY | |
| Preconditions | back to summary |
|---|---|
| private Preconditions() | |
| checkArgument | back to summary |
|---|---|
| public static void checkArgument(boolean expression, String errorMessageTemplate, Object... errorMessageArgs) Ensures the truth of an expression involving one or more parameters to the calling method. Borrowed from Guava.
| |
| checkArgument | back to summary |
|---|---|
| public static void checkArgument(boolean expression, Supplier<String> errorMessage) Ensures the truth of an expression using a supplier to fetch the error message in case of a failure.
| |
| checkNotNull | back to summary |
|---|---|
| public static <T> T checkNotNull(T reference)
Deprecated use Verifies that the given object reference is not
| |
| checkNotNull | back to summary |
|---|---|
| public static <T> T checkNotNull(T reference, String message)
Deprecated use Verifies that the given object reference is not
| |
| checkNotNull | back to summary |
|---|---|
| public static <T> void checkNotNull(FilterOperator<T> filterOperator) Verifies that the given
| |
| checkNotNullOrEmpty | back to summary |
|---|---|
| public static CharSequence checkNotNullOrEmpty(CharSequence s) Verifies that the given
| |
| checkNotNullOrEmpty | back to summary |
|---|---|
| public static CharSequence checkNotNullOrEmpty(CharSequence s, String message) Verifies that the given
| |
| checkNotNullOrEmpty | back to summary |
|---|---|
| public static <T> T[] checkNotNullOrEmpty(T[] array) Verifies that the given array is not
| |
| checkState | back to summary |
|---|---|
| public static void checkState(boolean expression, String errorMessageTemplate, Object... errorMessageArgs) Ensures the truth of an expression involving the state of the calling instance, but not involving any parameters to the calling method. Borrowed from Guava.
| |
| throwExceptionForBeingEmpty | back to summary |
|---|---|
| private static void throwExceptionForBeingEmpty() | |
| throwExceptionForBeingEmpty | back to summary |
|---|---|
| private static void throwExceptionForBeingEmpty(String message) | |