Record Class EMailSender.SentEmail
java.lang.Object
java.lang.Record
de.gustavblass.commons.email.EMailSender.SentEmail
- Record Components:
unencryptedEmail- The e-mail as it was sent, before encryption.encryptedEmail- The e-mail as it was sent, after encryption. Empty if it was not sent encrypted.
- Enclosing class:
EMailSender
public static record EMailSender.SentEmail(@NonNull Optional<ByteArrayOutputStream> unencryptedEmail, @NonNull Optional<ByteArrayOutputStream> encryptedEmail)
extends Record
Represents an e-mail that has been sent.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final @NonNull Optional<ByteArrayOutputStream> The field for theencryptedEmailrecord component.private final @NonNull Optional<ByteArrayOutputStream> The field for theunencryptedEmailrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionSentEmail(@NonNull Optional<ByteArrayOutputStream> unencryptedEmail, @NonNull Optional<ByteArrayOutputStream> encryptedEmail) Creates an instance of aSentEmailrecord class. -
Method Summary
Modifier and TypeMethodDescription@NonNull Optional<ByteArrayOutputStream> Returns the value of theencryptedEmailrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.@NonNull Optional<ByteArrayOutputStream> Returns the value of theunencryptedEmailrecord component.
-
Field Details
-
unencryptedEmail
The field for theunencryptedEmailrecord component. -
encryptedEmail
The field for theencryptedEmailrecord component.
-
-
Constructor Details
-
SentEmail
public SentEmail(@NonNull @NonNull Optional<ByteArrayOutputStream> unencryptedEmail, @NonNull @NonNull Optional<ByteArrayOutputStream> encryptedEmail) Creates an instance of aSentEmailrecord class.- Parameters:
unencryptedEmail- the value for theunencryptedEmailrecord componentencryptedEmail- the value for theencryptedEmailrecord component
-
-
Method Details
-
toString
-
hashCode
-
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). -
unencryptedEmail
Returns the value of theunencryptedEmailrecord component.- Returns:
- the value of the
unencryptedEmailrecord component
-
encryptedEmail
Returns the value of theencryptedEmailrecord component.- Returns:
- the value of the
encryptedEmailrecord component
-