public enum RealmFieldType extends Enum<RealmFieldType>
Normally there is no reason to interact with the underlying Realm types as Realm will automatically
convert between normal Java types and the Realm types. However it is possible to access these
types through a DynamicRealmObject
.
Enum Constant and Description |
---|
BINARY |
BINARY_LIST |
BOOLEAN |
BOOLEAN_LIST |
DATE |
DATE_LIST |
DOUBLE |
DOUBLE_LIST |
FLOAT |
FLOAT_LIST |
INTEGER |
INTEGER_LIST |
LINKING_OBJECTS |
LIST |
OBJECT |
STRING |
STRING_LIST |
Modifier and Type | Method and Description |
---|---|
static RealmFieldType |
fromNativeValue(int value)
Converts the underlying value used by the storage engine to the proper Realm type.
|
int |
getNativeValue()
Returns the native value representing this type.
|
boolean |
isValid(Object obj)
Checks if the given Java object can be converted to the underlying Realm type.
|
static RealmFieldType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static RealmFieldType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final RealmFieldType INTEGER
public static final RealmFieldType BOOLEAN
public static final RealmFieldType STRING
public static final RealmFieldType BINARY
public static final RealmFieldType DATE
public static final RealmFieldType FLOAT
public static final RealmFieldType DOUBLE
public static final RealmFieldType OBJECT
public static final RealmFieldType LIST
public static final RealmFieldType LINKING_OBJECTS
public static final RealmFieldType INTEGER_LIST
public static final RealmFieldType BOOLEAN_LIST
public static final RealmFieldType STRING_LIST
public static final RealmFieldType BINARY_LIST
public static final RealmFieldType DATE_LIST
public static final RealmFieldType FLOAT_LIST
public static final RealmFieldType DOUBLE_LIST
public static RealmFieldType[] values()
for (RealmFieldType c : RealmFieldType.values()) System.out.println(c);
public static RealmFieldType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic int getNativeValue()
public boolean isValid(Object obj)
obj
- object to test compatibility on.true
if object can be converted to the Realm type, false
otherwise.public static RealmFieldType fromNativeValue(int value)
value
- the value to convertIllegalArgumentException
- if value isn't valid.