Enum Status
- All Implemented Interfaces:
Serializable,Comparable<Status>
An interface used to represent API call's completion status.
- Author:
- Marko Zajc
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe action has not completed due to an error.Everything is OK, you may continue normally.The status is non-erroneous and the questions have been exhausted.Unknown status (should not ever occur under normal circumstances), indicates that the status level doesn't match any of the known ones. -
Method Summary
Modifier and TypeMethodDescriptionstatic StatusfromHtml(org.jsoup.nodes.Element gameRoot) static StatusfromJson(org.json.JSONObject json) static StatusfromString(String completion) booleantoString()static StatusReturns the enum constant of this type with the specified name.static Status[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
OK
Everything is OK, you may continue normally. -
QUESTIONS_EXHAUSTED
The status is non-erroneous and the questions have been exhausted. -
ERROR
The action has not completed due to an error. -
UNKNOWN
Unknown status (should not ever occur under normal circumstances), indicates that the status level doesn't match any of the known ones.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
isErroneous
public boolean isErroneous()- Returns:
- whether or not an exception should be thrown when this status is received
-
toString
-
fromJson
-
fromHtml
-
fromString
-