Class Header

  • All Implemented Interfaces:
    Option

    public final class Header
    extends Object
    A header parameter that will become part of the connection header. This can be used to pass configuration options such as expected result type and the format of the input.
    Since:
    1.0.0
    Author:
    Emil Forslund
    • Method Detail

      • header

        public static Header header​(String key,
                                    String value)
        Returns a new Header option. This method is intended to be imported statically.
        Parameters:
        key - the key
        value - the value
        Returns:
        the created header
      • getType

        public Option.Type getType()
        Description copied from interface: Option
        What type of option this is.
        Returns:
        the option type
      • getKey

        public final String getKey()
        Description copied from interface: Option
        The key of this option.
        Specified by:
        getKey in interface Option
        Returns:
        the key
      • getValue

        public final String getValue()
        Description copied from interface: Option
        The value of this option.
        Specified by:
        getValue in interface Option
        Returns:
        the value
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object