getValueList

abstract fun <T : Any> getValueList(propertyName: String, clazz: KClass<T>): RealmList<T>

Returns the list of non-nullable value elements referenced by the property name as a RealmList.

The class argument must be the KClass of the RealmStorageType for the property.

To retrieve values, objects or list of nullable elements or object use the get<X>Value, getObject and other get<X>List variants.

Return

the referenced RealmList

Parameters

propertyName

the name of the list property to retrieve the list for.

clazz

the Kotlin class of the list element type.

T

the type of the list element type.

Throws

if the class doesn't contain a field with the specific name, if trying to retrieve values for non-list properties or if clazz doesn't match the property's RealmStorageType.kClass.