realm-kotlin
realm-kotlin copied to clipboard
Add support for RealmAny
The API should look something like this:
interface RealmAny {
val type: Type
fun asInt(): Int
fun <T: RealmObject> asRealmObject(clazz: KClass<T>): T
fun isNull(): boolean
// etc.
enum class Type {
INT, OBJECT, NULL // etc.
}
companion object {
fun valueOf(value: Int?): RealmAny = TODO()
fun valueOf(value: RealmObject): RealmAny = TODO()
fun nullValue(): RealmAny = TODO()
// etc.
}
}
Observations: TBD