class Predicates
A collection of predefined general-purpose Predicate
implementations.
static fun <T : Any!> allOf(vararg predicates: Predicate<T>!): Predicate<T>!
Returns a predicate that will return true if all given predicates return true. Please be aware that an empty array of predicates will cause this function to return true. |
|
static fun <T : Any!> alwaysFalse(): Predicate<T>!
Returns a predicate that will always return false for any passed value. |
|
static fun <T : Any!> alwaysTrue(): Predicate<T>!
Returns a predicate that will always return true for any passed value. |
|
static fun <T : Any!> anyOf(vararg predicates: Predicate<T>!): Predicate<T>!
Returns a predicate that will return true if one of the given predicates returns true. |
|
static fun <T : Any!, C : RuntimeException!> failWith(exception: C): Predicate<T>! static fun <T : Any!, C : RuntimeException!> failWith(exception: Class<C>): Predicate<T>!
Returns a predicate that will fail with a given |
|
static fun <R : Any!, T : Any!> instanceOf(type: Class<T>): Predicate<R>!
Returns a predicate checking if value is instance of the given type. |
|
static fun <T : Any!> is(value: T): Predicate<T>!
Returns a predicate checking if the given value is the same as passed one. |
|
static fun <T : Any!> isNot(value: T): Predicate<T>!
Returns a predicate checking if the given value is not the same as passed one. |
|
static fun <T : Any!> isNotNull(): Predicate<T>!
Returns a predicate checking if given value is not null. |
|
static fun <T : Any!> isNull(): Predicate<T>!
Returns a predicate checking if given value is null. |
|
static fun <T : Any!> noneOf(vararg predicates: Predicate<T>!): Predicate<T>!
Returns a predicate that will return true if none of the given predicates returns true. |