asByte

abstract fun asByte(): Byte

Returns the value from this RealmAny as a Byte. RealmAny instances created using Short, Int, Byte, Char or Long values can be converted to any of these types safely, although overflow might occur, for example, if the value to be output as a Short is greater than Byte.MAX_VALUE.

Throws

if the stored value cannot be safely converted to Byte.

if the stored value cannot be coerced to another numeric type.