Class Message

    • Constructor Detail

      • Message

        public Message()
        Default constructor for Message object. Callers should use the setter or fluent setter (with...) methods to initialize the object after creating it.
      • Message

        public Message​(Content subject,
                       Body body)
        Constructs a new Message object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.
        Parameters:
        subject - The subject of the message: A short summary of the content, which will appear in the recipient's inbox.
        body - The message body.
    • Method Detail

      • setSubject

        public void setSubject​(Content subject)

        The subject of the message: A short summary of the content, which will appear in the recipient's inbox.

        Parameters:
        subject - The subject of the message: A short summary of the content, which will appear in the recipient's inbox.
      • getSubject

        public Content getSubject()

        The subject of the message: A short summary of the content, which will appear in the recipient's inbox.

        Returns:
        The subject of the message: A short summary of the content, which will appear in the recipient's inbox.
      • withSubject

        public Message withSubject​(Content subject)

        The subject of the message: A short summary of the content, which will appear in the recipient's inbox.

        Parameters:
        subject - The subject of the message: A short summary of the content, which will appear in the recipient's inbox.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setBody

        public void setBody​(Body body)

        The message body.

        Parameters:
        body - The message body.
      • getBody

        public Body getBody()

        The message body.

        Returns:
        The message body.
      • withBody

        public Message withBody​(Body body)

        The message body.

        Parameters:
        body - The message body.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • toString

        public String toString()
        Returns a string representation of this object; useful for testing and debugging.
        Overrides:
        toString in class Object
        Returns:
        A string representation of this object.
        See Also:
        Object.toString()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object