Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.88 KB | None | 0 0
  1. public class EmailMessage
  2. {
  3. private String from;
  4. private LinkedList <String> to;
  5. private String subject;
  6. private String content;
  7. private String mimeType;
  8.  
  9. public EmailMessage(private String from_,
  10.     private LinkedList <String>to_,
  11.     private String subject_,
  12.     private String content_,
  13.     private String mimeType_)
  14.    
  15.     {
  16.     this.from=from_;
  17.     this.to=to_;
  18.     this.subject=subject_;
  19.     this.content=content_;
  20.     this.miniType=miniType_;   
  21.     }
  22. public Builder addFrom(String from_) {
  23.             this.from = from_;
  24.             return this;
  25.         }
  26.  
  27. public Builder to(LinkedList<String> to_) {
  28.             this.to = to_;
  29.             return this;
  30.         }
  31.  
  32. public Builder addSubject(String subject_) {
  33.             this.subject = subject_;
  34.             return this;
  35.         }
  36.  
  37. public Builder addcontent(String content_) {
  38.             this.content = content_;
  39.             return this;
  40.         }
  41.  
  42. public static Builder builder()
  43.     {
  44.     return new EmailMessage.Builder();
  45.     }
  46.  }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement