Enum Class CursorState
- All Implemented Interfaces:
Serializable
,Comparable<CursorState>
,Constable
Represents the possible states of a database cursor.
A cursor can be in one of the following states:
IDLE
- The cursor is created but not yet started.STARTED
- The cursor has been started and is active.CLOSED
- The cursor has been closed and is no longer usable.
Example usage:
CursorState state = CursorState.IDLE;
switch (state) {
case IDLE:
System.out.println("The cursor is idle.");
break;
case STARTED:
System.out.println("The cursor is active.");
break;
case CLOSED:
System.out.println("The cursor is closed.");
break;
}
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic CursorState
Returns the enum constant of this class with the specified name.static CursorState[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
IDLE
Indicates that the cursor is created but not yet started. -
STARTED
Indicates that the cursor has been started and is active. -
CLOSED
Indicates that the cursor has been closed and is no longer usable.
-
-
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
-