class Checks


Substitute for Guava Preconditions to avoid dependency.

Summary

Public functions

java-static Unit
checkArgument(expression: Boolean)
java-static Unit
checkArgument(expression: Boolean, errorMessage: Any!)
java-static Unit
checkArgument(
    expression: Boolean,
    errorMessageTemplate: String!,
    errorMessageArgs: Array<Any!>!
)
java-static T!
<T> checkNotNull(reference: T!)
java-static T!
<T> checkNotNull(reference: T!, errorMessage: Any!)
java-static T!
<T> checkNotNull(
    reference: T!,
    errorMessageTemplate: String!,
    errorMessageArgs: Array<Any!>!
)
java-static Unit
checkState(expression: Boolean, errorMessage: Any!)
java-static Unit
checkState(
    expression: Boolean,
    errorMessageTemplate: String!,
    errorMessageArgs: Array<Any!>!
)

Public functions

checkArgument

java-static fun checkArgument(expression: Boolean): Unit

checkArgument

java-static fun checkArgument(expression: Boolean, errorMessage: Any!): Unit

checkArgument

java-static fun checkArgument(
    expression: Boolean,
    errorMessageTemplate: String!,
    errorMessageArgs: Array<Any!>!
): Unit

checkNotNull

java-static fun <T> checkNotNull(reference: T!): T!

checkNotNull

java-static fun <T> checkNotNull(reference: T!, errorMessage: Any!): T!

checkNotNull

java-static fun <T> checkNotNull(
    reference: T!,
    errorMessageTemplate: String!,
    errorMessageArgs: Array<Any!>!
): T!

checkState

java-static fun checkState(expression: Boolean, errorMessage: Any!): Unit

checkState

java-static fun checkState(
    expression: Boolean,
    errorMessageTemplate: String!,
    errorMessageArgs: Array<Any!>!
): Unit