Enum Class HTTPVersions

java.lang.Object
java.lang.Enum<HTTPVersions>
de.linusdev.lutils.http_WIP.version.HTTPVersions
All Implemented Interfaces:
HTTPVersion, Serializable, Comparable<HTTPVersions>, Constable

public enum HTTPVersions extends Enum<HTTPVersions> implements HTTPVersion
  • Enum Constant Details

  • Method Details

    • values

      public static HTTPVersions[] 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 HTTPVersions 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
    • of

      public static HTTPVersion of(@NotNull @NotNull String version)
    • getName

      @NotNull public @NotNull String getName()
      Description copied from interface: HTTPVersion
      The first part of the version. For example in "HTTP/1.1" it would be "HTTP"
      Specified by:
      getName in interface HTTPVersion
      Returns:
      name as String
    • getVersion

      @NotNull public @NotNull String getVersion()
      Description copied from interface: HTTPVersion
      The first part of the version. For example in "HTTP/1.1" it would be "1.1"
      Specified by:
      getVersion in interface HTTPVersion
      Returns:
      version as String