Last active
March 20, 2022 09:20
-
-
Save Gogetter/118fedfaafd5275c9e5d7c73f4a73203 to your computer and use it in GitHub Desktop.
Lombok Approach
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Value | |
public class EmailData { | |
String recipient; | |
String subject; | |
String message; | |
Set<EmailAttachment> attachments; | |
@JsonIgnore | |
public boolean hasAttachments() { | |
return (attachments != null && !attachments.isEmpty()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment