public class ExitStatus extends Object implements Comparable<ExitStatus>
ValidatorExecution.
ExitStatus is immutable and therefore thread-safe.| Modifier and Type | Field and Description |
|---|---|
static ExitStatus |
COMPLETED
Convenient constant value representing completed state.
|
static ExitStatus |
FAILED
Convenient constant value representing failed state.
|
static ExitStatus |
SKIPPED
Convenient constant value representing skipped state.
|
static ExitStatus |
UNKNOWN
Convenient constant value representing unknown state.
|
| Constructor and Description |
|---|
ExitStatus(String exitCode) |
ExitStatus(String exitCode,
String exitDescription) |
| Modifier and Type | Method and Description |
|---|---|
ExitStatus |
addExitDescription(String description)
Add an exit description to an existing
ExitStatus. |
ExitStatus |
and(ExitStatus status)
Create a new
ExitStatus with a logical combination of the exit code, and a concatenation of the
descriptions. |
int |
compareTo(ExitStatus status) |
boolean |
equals(Object obj)
Compare the fields one by one.
|
String |
getExitCode()
Getter for the exit code (defaults to blank).
|
String |
getExitDescription()
Getter for the exit description (defaults to blank)
|
int |
hashCode()
Compatible with the equals implementation.
|
ExitStatus |
replaceExitCode(String code)
Add an exit code to an existing
ExitStatus. |
String |
toString() |
public static final ExitStatus UNKNOWN
public static final ExitStatus COMPLETED
public static final ExitStatus FAILED
public static final ExitStatus SKIPPED
public ExitStatus(String exitCode)
public String getExitCode()
public String getExitDescription()
String containing the exit description.public ExitStatus and(ExitStatus status)
ExitStatus with a logical combination of the exit code, and a concatenation of the
descriptions. If either value has a higher severity then its exit code will be used in the result. In the case of
equal severity, the exit code is replaced if the new value is alphabetically greater.status - an ExitStatus to combine with this one.ExitStatus combining the current value and the argument provided.public ExitStatus replaceExitCode(String code)
ExitStatus. If there is already a code present tit will be replaced.code - the code to addExitStatus with the same properties but a new exit code.public ExitStatus addExitDescription(String description)
ExitStatus. If there is already a description present the two will
be concatenated with a semicolon.description - the description to addExitStatus with the same properties but a new exit descriptionpublic int compareTo(ExitStatus status)
compareTo in interface Comparable<ExitStatus>status - an ExitStatus to compareComparablepublic boolean equals(Object obj)
equals in class ObjectObject.equals(java.lang.Object)public int hashCode()
hashCode in class ObjectObject.hashCode()Copyright © 2018 Latitude Srls. All rights reserved.