Checks

public final class Checks
extends Object

java.lang.Object
   ↳ androidx.test.espresso.intent.Checks


Substitute for Guava Preconditions to avoid guava as a dep.

Summary

Public methods

static void checkArgument(boolean expression, Object errorMessage)
static void checkArgument(boolean expression)
static void checkArgument(boolean expression, String errorMessageTemplate, Object... errorMessageArgs)
static <T> T checkNotNull(T reference, Object errorMessage)
static <T> T checkNotNull(T reference)
static <T> T checkNotNull(T reference, String errorMessageTemplate, Object... errorMessageArgs)
static void checkState(boolean expression, Object errorMessage)
static void checkState(boolean expression, String errorMessageTemplate, Object... errorMessageArgs)

Inherited methods

Public methods

checkArgument

public static void checkArgument (boolean expression, 
                Object errorMessage)

Parameters
expression boolean

errorMessage Object

checkArgument

public static void checkArgument (boolean expression)

Parameters
expression boolean

checkArgument

public static void checkArgument (boolean expression, 
                String errorMessageTemplate, 
                Object... errorMessageArgs)

Parameters
expression boolean

errorMessageTemplate String

errorMessageArgs Object

checkNotNull

public static T checkNotNull (T reference, 
                Object errorMessage)

Parameters
reference T

errorMessage Object

Returns
T

checkNotNull

public static T checkNotNull (T reference)

Parameters
reference T

Returns
T

checkNotNull

public static T checkNotNull (T reference, 
                String errorMessageTemplate, 
                Object... errorMessageArgs)

Parameters
reference T

errorMessageTemplate String

errorMessageArgs Object

Returns
T

checkState

public static void checkState (boolean expression, 
                Object errorMessage)

Parameters
expression boolean

errorMessage Object

checkState

public static void checkState (boolean expression, 
                String errorMessageTemplate, 
                Object... errorMessageArgs)

Parameters
expression boolean

errorMessageTemplate String

errorMessageArgs Object