Checks

public final class Checks
extends Object

java.lang.Object
   ↳ android.support.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

From class java.lang.Object

Public methods

checkArgument

void checkArgument (boolean expression, 
                Object errorMessage)

Parameters
expression boolean

errorMessage Object

checkArgument

void checkArgument (boolean expression)

Parameters
expression boolean

checkArgument

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

Parameters
expression boolean

errorMessageTemplate String

errorMessageArgs Object

checkNotNull

T checkNotNull (T reference, 
                Object errorMessage)

Parameters
reference T

errorMessage Object

Returns
T

checkNotNull

T checkNotNull (T reference)

Parameters
reference T

Returns
T

checkNotNull

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

Parameters
reference T

errorMessageTemplate String

errorMessageArgs Object

Returns
T

checkState

void checkState (boolean expression, 
                Object errorMessage)

Parameters
expression boolean

errorMessage Object

checkState

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

Parameters
expression boolean

errorMessageTemplate String

errorMessageArgs Object