Enum Class HttpStatusCodes

java.lang.Object
java.lang.Enum<HttpStatusCodes>
org.apache.olingo.odata2.api.commons.HttpStatusCodes
All Implemented Interfaces:
Serializable, Comparable<HttpStatusCodes>, Constable

public enum HttpStatusCodes extends Enum<HttpStatusCodes>
HTTP status codes as defined in RFC2616-sec10 and additional status codes as defined in RFC6585
  • Enum Constant Details

  • Method Details

    • values

      public static HttpStatusCodes[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static HttpStatusCodes valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • fromStatusCode

      public static HttpStatusCodes fromStatusCode(int statusCode)
      Convert a numerical status code into the corresponding status enum object.
      Parameters:
      statusCode - the numerical status code
      Returns:
      the matching status enum object or null if no matching enum is defined
    • getStatusCode

      public int getStatusCode()
      Get the associated status code.
      Returns:
      the status code.
    • getInfo

      public String getInfo()
      Get the status code info.
      Returns:
      the status code info
    • toString

      public String toString()
      Get the status code info.
      Overrides:
      toString in class Enum<HttpStatusCodes>
      Returns:
      the status code info