Module jakarta.mail
Package jakarta.mail

Class Header

  • Direct Known Subclasses:
    InternetHeaders.InternetHeader

    public class Header
    extends java.lang.Object
    The Header class stores a name/value pair to represent headers.
    Author:
    John Mani
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String name
      The name of the header.
      protected java.lang.String value
      The value of the header.
    • Constructor Summary

      Constructors 
      Constructor Description
      Header​(java.lang.String name, java.lang.String value)
      Construct a Header object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      java.lang.String getName()
      Returns the name of this header.
      java.lang.String getValue()
      Returns the value of this header.
      int hashCode()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • name

        protected java.lang.String name
        The name of the header.
      • value

        protected java.lang.String value
        The value of the header.
    • Constructor Detail

      • Header

        public Header​(java.lang.String name,
                      java.lang.String value)
        Construct a Header object.
        Parameters:
        name - name of the header
        value - value of the header
    • Method Detail

      • getName

        public java.lang.String getName()
        Returns the name of this header.
        Returns:
        name of the header
      • getValue

        public java.lang.String getValue()
        Returns the value of this header.
        Returns:
        value of the header
      • hashCode

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

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