Package jakarta.mail

Class Header

java.lang.Object
jakarta.mail.Header
Direct Known Subclasses:
InternetHeaders.InternetHeader

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

    • name

      protected String name
      The name of the header.
      Since:
      JavaMail 1.4
    • value

      protected String value
      The value of the header.
      Since:
      JavaMail 1.4
  • Constructor Details

    • Header

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

    • getName

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

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

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

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