RealmCollection
-
Returns the minimum (lowest) value of the collection, or
nil
if the collection is empty. -
Returns the maximum (highest) value of the collection, or
nil
if the collection is empty.
-
Returns the sum of the values in the collection, or
nil
if the collection is empty. -
Returns the average of all of the values in the collection.
-
Returns a
Results
containing the objects in the collection, but sorted.Objects are sorted based on their values. For example, to sort a collection of
Date
s from neweset to oldest based, you might calldates.sorted(ascending: true)
.