sdk-common / com.tomtom.online.sdk.common.functional / Predicate / and

and

open fun and(@NonNull other: Predicate<T>): Predicate<T>!

Performs a predicate composition returning a "short-circuit logical AND" of this predicate and another. Please note that first predicate to get evaluated is this predicate. If it returns false then the other predicate will not get evaluated. Any exceptions thrown during evaluation of either predicate are relayed to the caller; if evaluation of this predicate throws an exception, the other predicate will not be evaluated.

Parameters

other - Predicate<T>: predicate that will be composed with "this" predicate.

Return
Predicate<T>!: a composed predicate (logical AND).