public enum TransportStatus extends Enum<TransportStatus>
Transport.Transport| Enum Constant and Description |
|---|
OFFLINE
The transport is currently inactive and not accepting routes.
|
ONLINE
The transport is currently active and accepting routes.
|
| Modifier and Type | Field and Description |
|---|---|
private String |
status
The string representation of the status.
|
private static Map<String,TransportStatus> |
statuses
Map of the possible statuses.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(String status)
Checks if this status is the same as the provided status.
|
static TransportStatus |
getStatus(String status)
Changes a String to an TransportStatus.
|
String |
toString() |
static TransportStatus |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TransportStatus[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TransportStatus OFFLINE
public static final TransportStatus ONLINE
private static final Map<String,TransportStatus> statuses
private final String status
public static TransportStatus[] values()
for (TransportStatus c : TransportStatus.values()) System.out.println(c);
public static TransportStatus 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 static TransportStatus getStatus(String status)
status - represented as a String.public boolean equals(String status)
status - a string of statuspublic String toString()
toString in class Enum<TransportStatus>