Package io.objectbox.annotation
Enum Class IndexType
- All Implemented Interfaces:
Serializable
,Comparable<IndexType>
,Constable
ObjectBox offers a value and two hash index types, from which it chooses a reasonable default (see
DEFAULT
).
For some queries/use cases it might make sense to override the default choice for optimization purposes.
Note: hash indexes are currently only supported for string properties.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionUse a (fast non-cryptographic) hash of the property value to build the index.Use a long (fast non-cryptographic) hash of the property value to build the index.Use the property value to build the index. -
Method Summary
-
Enum Constant Details
-
DEFAULT
-
VALUE
Use the property value to build the index. For Strings this may occupy more space than the default setting. -
HASH
Use a (fast non-cryptographic) hash of the property value to build the index. Internally, it uses a 32 bit hash with a decent hash collision behavior. Because occasional collisions do not really impact performance, this is usually a better choice thanHASH64
as it takes less space. -
HASH64
Use a long (fast non-cryptographic) hash of the property value to build the index.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-