public final class ConnectionState extends ApiEnumeration<ConnectionState>
ConnectionState
enumeration class defines the valid states for a
removable device that is configured to be connected.
Modifier and Type | Class and Description |
---|---|
static class |
ConnectionState.Values
Native Java
enum representing this enumeration class. |
Modifier and Type | Field and Description |
---|---|
static ConnectionState |
CONNECTED
The device is connected and working correctly.
|
static ConnectionState |
NOT_CONNECTED
The device is not connected.
|
static ConnectionState |
RECOVERABLE_ERROR
Device connection failed due to a recoverable error; for example, the virtual
device backing is currently in use by another virtual machine.
|
static ConnectionState |
UNKNOWN
The device status is unknown.
|
static ConnectionState |
UNRECOVERABLE_ERROR
Device connection failed due to an unrecoverable error; for example, the virtual
device backing does not exist.
|
Modifier and Type | Method and Description |
---|---|
ConnectionState.Values |
getEnumValue()
Returns a native Java
enum constant representing this enumeration
constant. |
boolean |
isUnknown()
Checks if this enumeration constant is unknown.
|
static ConnectionState |
valueOf(java.lang.String name)
Returns the enumeration constant for the specified name.
|
static ConnectionState[] |
values()
Retrieve all enumeration constants pre-defined by this enumeration class.
|
buildNameMap, equals, hashCode, name, toString
public static final ConnectionState CONNECTED
public static final ConnectionState RECOVERABLE_ERROR
public static final ConnectionState UNRECOVERABLE_ERROR
public static final ConnectionState NOT_CONNECTED
public static final ConnectionState UNKNOWN
public static ConnectionState[] values()
Additional instances might exist at runtime, for example to represent a
new constant added to this enumeration class in subsequent version of the
API. Such new constant is represented as instance of ConnectionState
but is not pre-defined.
null
.public static ConnectionState valueOf(java.lang.String name)
If the name matches exactly the identifier used to declare an enumeration constant from this enumeration class, the constant in question will be returned.
Otherwise, a new instance of ConnectionState
will be returned for the
specified name, which will not be one of the pre-defined constant
instances. Such new instance maps to the ConnectionState.Values._UNKNOWN
enum
constant from the native Java enum
.
name
- The name of the constant to return. Must not be null
.null
.public boolean isUnknown()
valueOf(java.lang.String)
and values()
.true
if this constant is unknown, and false
otherwise.public ConnectionState.Values getEnumValue()
enum
constant representing this enumeration
constant. The result is useful for usual handling of Java enum
,
for example it can be used in switch
statements.
If this enumeration constant is unknown, then ConnectionState.Values._UNKNOWN
enum
constant is returned.
The native Java enum
is ConnectionState.Values
.
enum
constant. Never null
.