Enum Class HTTP_METHOD

java.lang.Object
java.lang.Enum<HTTP_METHOD>
de.uplanet.net.http.HTTP_METHOD
All Implemented Interfaces:
Serializable, Comparable<HTTP_METHOD>, Constable

@Scriptable @ConstantClass public enum HTTP_METHOD extends Enum<HTTP_METHOD>
  • Enum Constant Details

  • Method Details

    • values

      public static HTTP_METHOD[] 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 HTTP_METHOD 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
    • matches

      public boolean matches(String p_strMethod)
      Check if this method matches the given method value.
      Parameters:
      p_strMethod - The HTTP method.
      Returns:
      true if the given value matches this method, or false otherwise.
    • toNames

      public static ArrayList<String> toNames(HTTP_METHOD... p_methods)
      Convert the given HTTP methods to a list of strings.
      Parameters:
      p_methods - The HTTP methods.
      Returns:
      The given methods as a list of strings.
    • toNames

      public static ArrayList<String> toNames(Collection<HTTP_METHOD> p_methods)
      Convert the given HTTP methods to a list of strings.
      Parameters:
      p_methods - The HTTP methods.
      Returns:
      The given methods as a list of strings.
    • toHeaderValue

      public static String toHeaderValue(HTTP_METHOD... p_methods)
      Convert the given HTTP methods to a comma-separated list suitable for being used as a HTTP header value.

      If the list of given methods is empty, null will be returned.

      Parameters:
      p_methods - The HTTP methods.
      Returns:
      A comma-separated list of methods, or null.
    • toHeaderValue

      public static String toHeaderValue(Collection<HTTP_METHOD> p_methods)
      Convert the given HTTP methods to a comma-separated list suitable for being used as a HTTP header value.

      If the list of given methods is null or empty, this method returns null.

      Parameters:
      p_methods - The HTTP methods.
      Returns:
      A comma-separated list of methods, or null.