@Retention(value=CLASS) @Target(value=FIELD) public @interface Required
Required
,
it cannot be set to null
.
Only Boolean, Byte, Short, Integer, Long, Float, Double, String, byte[], Date
can be annotated
with Required
. Compiling will fail when fields with other types have Required
annotation.
Fields with primitive types and the RealmList
type are required implicitly.
Fields with RealmObject
type are always nullable.