Package com.priint.pubserverapi.mail
Record Class MessageBody
java.lang.Object
java.lang.Record
com.priint.pubserverapi.mail.MessageBody
Represents the body content of an email message, including its MIME type.
-
Constructor Summary
ConstructorsConstructorDescriptionMessageBody(BodyMimeType bodyMimeType, String message) Constructs a newMessageBodywith the specified MIME type and message content. -
Method Summary
Modifier and TypeMethodDescriptionReturns the MIME type of the message body.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.message()Returns the textual content of the message body.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MessageBody
Constructs a newMessageBodywith the specified MIME type and message content.- Parameters:
bodyMimeType- the MIME type of the message body.message- the content of the message body.
-
-
Method Details
-
bodyMimeType
Returns the MIME type of the message body.- Returns:
- the body MIME type.
-
message
Returns the textual content of the message body.- Returns:
- the message content.
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object).
-