Docs Menu

Docs HomeDevelop ApplicationsAtlas Device SDK

Enumerations - Java SDK

On this page

  • Usage

Enumerations, also known as enums, are not supported natively in the Java SDK. However, you can use Java and Kotlin enums in your Realm objects if you follow these steps.

To use an enum in a Realm object class, define a field with a type matching the underlying data type of your enum. Create getters and setters for the field that convert the field value between the underlying value and the enum type. You can use the Java's built-in Enum.valueOf() method to convert from the underlying type to the enum type.

←  RealmAny - Java SDKEmbedded Objects - Java SDK →

On this page