public final class MARSStatus extends Object implements Comparable
Modifier and Type | Field and Description |
---|---|
static MARSStatus |
ERROR |
static MARSStatus |
OK |
static MARSStatus |
REMOVED |
static String[] |
STATUS_NAMES |
static MARSStatus |
UNDEFINED |
static MARSStatus |
WARNING |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Object o) |
static MARSStatus |
find(String status)
Returns status embedded in the specified string by matching it's prefix with known statuses.
|
String |
getName()
Returns name of this status that can be used as a prefix for corresponding value.
E.g.: "Ok", "Warning", "Error", "Removed", and "<undefined>". |
String |
getShortName()
Fixed-length uppercase name for the corresponding status.
E.g.: "OK", "WARNG", "ERROR", "RMVED", and "UNDEF". |
String |
toString() |
static String |
toString(MARSStatus marsStatus)
Returns the string representation of the
MARSStatus argument. |
public static final MARSStatus OK
public static final MARSStatus WARNING
public static final MARSStatus ERROR
public static final MARSStatus REMOVED
public static final MARSStatus UNDEFINED
public static final String[] STATUS_NAMES
public String getName()
public static String toString(MARSStatus marsStatus)
MARSStatus
argument.
Note: null
argument is considered as UNDEFINED
marsStatus
- MARSStatus
to get String bynull
, then a string for UNDEFINED
;
otherwise, the value of marsStatus.toString()
is
returned.public String getShortName()
public static MARSStatus find(String status)
UNDEFINED
if no matching status was found.public int compareTo(Object o)
compareTo
in interface Comparable
Copyright © 2015 Devexperts. All Rights Reserved.