Java com.google.common.base Preconditions fields, constructors, methods, implement or subclass

Example usage for Java com.google.common.base Preconditions fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for com.google.common.base Preconditions.

The text is from its open source code.

Method

voidcheckArgument(boolean expression, @Nullable Object errorMessage)
Ensures the truth of an expression involving one or more parameters to the calling method.
voidcheckArgument(boolean expression)
Ensures the truth of an expression involving one or more parameters to the calling method.
voidcheckArgument(boolean expression, @Nullable String errorMessageTemplate, @Nullable Object... errorMessageArgs)
Ensures the truth of an expression involving one or more parameters to the calling method.
intcheckElementIndex(int index, int size, @Nullable String desc)
Ensures that index specifies a valid element in an array, list or string of size size .
intcheckElementIndex(int index, int size)
Ensures that index specifies a valid element in an array, list or string of size size .
TcheckNotNull(T reference)
Ensures that an object reference passed as a parameter to the calling method is not null.
TcheckNotNull(T reference, @Nullable Object errorMessage)
Ensures that an object reference passed as a parameter to the calling method is not null.
TcheckNotNull(T reference, @Nullable String errorMessageTemplate, @Nullable Object... errorMessageArgs)
Ensures that an object reference passed as a parameter to the calling method is not null.
intcheckPositionIndex(int index, int size)
Ensures that index specifies a valid position in an array, list or string of size size .
intcheckPositionIndex(int index, int size, @Nullable String desc)
Ensures that index specifies a valid position in an array, list or string of size size .
voidcheckPositionIndexes(int start, int end, int size)
Ensures that start and end specify a valid positions in an array, list or string of size size , and are in order.
voidcheckState(boolean expression)
Ensures the truth of an expression involving the state of the calling instance, but not involving any parameters to the calling method.
voidcheckState(boolean expression, @Nullable Object errorMessage)
Ensures the truth of an expression involving the state of the calling instance, but not involving any parameters to the calling method.
voidcheckState(boolean expression, @Nullable String errorMessageTemplate, @Nullable Object... errorMessageArgs)
Ensures the truth of an expression involving the state of the calling instance, but not involving any parameters to the calling method.