Enum Class HttpEquiv

java.lang.Object
java.lang.Enum<HttpEquiv>
com.oorian.html.elements.consts.HttpEquiv
All Implemented Interfaces:
Serializable, Comparable<HttpEquiv>, Constable

public enum HttpEquiv extends Enum<HttpEquiv>
Enumeration defining the HTTP-equivalent meta tag values. This enum provides type-safe constants for the meta element's "http-equiv" attribute, which provides HTTP header information that can be used by browsers.
Since:
1.0
Version:
1.0
Author:
Marvin P. Warble Jr.
See Also:
  • Enum Constant Details

    • CONTENT_TYPE

      public static final HttpEquiv CONTENT_TYPE
      Specifies the character encoding for the HTML document. Example: <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    • DEFAULT_STYLE

      public static final HttpEquiv DEFAULT_STYLE
      Specifies the preferred stylesheet to use. Used to select which of multiple stylesheets should be active by default.
    • REFRESH

      public static final HttpEquiv REFRESH
      Instructs the browser to refresh or redirect after a specified time. Example: <meta http-equiv="refresh" content="30"> refreshes every 30 seconds.
    • CONTENT_SECURITY_POLICY

      public static final HttpEquiv CONTENT_SECURITY_POLICY
      Specifies a Content Security Policy for the document. Defines which content sources are allowed to be loaded by the browser. Example: <meta http-equiv="content-security-policy" content="default-src 'self'">
    • CONTENT_SECURITY_POLICY_REPORT_ONLY

      public static final HttpEquiv CONTENT_SECURITY_POLICY_REPORT_ONLY
      Specifies a Content Security Policy in report-only mode for testing. Violations are reported but not enforced by the browser. Example: <meta http-equiv="content-security-policy-report-only" content="default-src 'self'">
  • Method Details

    • values

      public static HttpEquiv[] 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 HttpEquiv 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
    • getValue

      public String getValue()
      Gets the HTTP-equiv value for use in meta elements.
      Returns:
      the string value used in HTML http-equiv attribute.
    • toString

      public String toString()
      Overrides:
      toString in class Enum<HttpEquiv>