limit

abstract fun limit(limit: Int): RealmQuery<T>

Limits the number of objects returned in case the query matched more objects.

Note that when using this method in combination with sort and distinct they will be executed in the order they where added which can affect the end result.

Parameters

limit

a limit that is greater than or equal to 1.

Throws

if the provided limit is less than 1.