Package dev.morphia.utils
Enum IndexDirection
- java.lang.Object
-
- java.lang.Enum<IndexDirection>
-
- dev.morphia.utils.IndexDirection
-
- All Implemented Interfaces:
Serializable
,Comparable<IndexDirection>
public enum IndexDirection extends Enum<IndexDirection>
Defines the "direction" of an index.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ASC
DESC
GEO2D
GEO2DSPHERE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
toIndexValue()
Returns the value as needed by the index definition documentstatic IndexDirection
valueOf(String name)
Returns the enum constant of this type with the specified name.static IndexDirection[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ASC
public static final IndexDirection ASC
-
DESC
public static final IndexDirection DESC
-
GEO2D
public static final IndexDirection GEO2D
-
GEO2DSPHERE
public static final IndexDirection GEO2DSPHERE
-
-
Method Detail
-
values
public static IndexDirection[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (IndexDirection c : IndexDirection.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static IndexDirection valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
toIndexValue
public Object toIndexValue()
Returns the value as needed by the index definition document- Returns:
- the value
-
-