Class Header


  • public final class Header
    extends java.lang.Object
    Represents a Header to be added to the HttpServletResponse
    • Constructor Summary

      Constructors 
      Constructor Description
      Header​(java.lang.String headerName, java.lang.String... headerValues)
      Creates a new instance
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      java.lang.String getName()
      Gets the name of the header.
      java.util.List<java.lang.String> getValues()
      Gets the values of the header.
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Header

        public Header​(java.lang.String headerName,
                      java.lang.String... headerValues)
        Creates a new instance
        Parameters:
        headerName - the name of the header
        headerValues - the values of the header
    • Method Detail

      • getName

        public java.lang.String getName()
        Gets the name of the header. Cannot be null.
        Returns:
        the name of the header.
      • getValues

        public java.util.List<java.lang.String> getValues()
        Gets the values of the header. Cannot be null, empty, or contain null values.
        Returns:
        the values of the header
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object