java.lang.Object
java.lang.Enum<Status>
org.eu.zajc.akiwrapper.core.utils.route.Status
All Implemented Interfaces:
Serializable, Comparable<Status>

public enum Status extends Enum<Status>
An interface used to represent API call's completion status.
Author:
Marko Zajc
  • Enum Constant Details

    • OK

      public static final Status OK
      Everything is OK, you may continue normally.
    • QUESTIONS_EXHAUSTED

      public static final Status QUESTIONS_EXHAUSTED
      The status is non-erroneous and the questions have been exhausted.
    • ERROR

      public static final Status ERROR
      The action has not completed due to an error.
    • UNKNOWN

      public static final Status 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

      public static Status[] 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

      public static Status valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • isErroneous

      public boolean isErroneous()
      Returns:
      whether or not an exception should be thrown when this status is received
    • toString

      public String toString()
      Overrides:
      toString in class Enum<Status>
      Returns:
      this level's name as provided by the API
    • fromJson

      @Nonnull public static Status fromJson(@Nonnull org.json.JSONObject json)
    • fromHtml

      @Nonnull public static Status fromHtml(@Nonnull org.jsoup.nodes.Element gameRoot)
    • fromString

      @Nonnull public static Status fromString(@Nonnull String completion)