filter

fun <T : Any> DistinctIterable<T>.filter(filter: String): DistinctIterable<T>
fun <T : Any> FindIterable<T>.filter(filter: String): FindIterable<T>

Sets the query filter to apply to the query.

Return

this

Parameters

filter

the filter, which may be null


inline fun <T> MongoIterable<T>.filter(crossinline predicate: (T) -> Boolean): List<T>

Returns a list containing only elements matching the given predicate.