find

fun <T : RealmObject, R> RealmQuery<T>.find(block: (RealmResults<T>) -> R): R

Similar to RealmQuery.find but it receives a block in which the RealmResults from the query are provided.

Return

whatever block returns

Parameters

T

the type of the query

R

the type returned by block

fun <T, R> RealmScalarQuery<T>.find(block: (T) -> R): R

Similar to RealmScalarQuery.find but it receives a block in which the scalar result from the query is provided.

Return

whatever block returns

Parameters

T

the type of the query

R

the type returned by block

fun <T, R> RealmScalarNullableQuery<T>.find(block: (T?) -> R): R

Similar to RealmScalarNullableQuery.find but it receives a block in which the scalar result from the query is provided.

Return

whatever block returns

Parameters

T

the type of the query

R

the type returned by block

fun <T : RealmObject, R> RealmSingleQuery<T>.find(block: (T?) -> R): R

Similar to RealmSingleQuery.find but it receives a block in which the RealmObject from the query is provided.

Return

whatever block returns

Parameters

T

the type of the query

R

the type returned by block