Replace create post ajax page with Kotlin version
[Sone.git] / src / main / java / net / pterodactylus / sone / text / FreemailPart.java
1 package net.pterodactylus.sone.text;
2
3 /**
4  * {@link Part} implementation that holds a freemail address.
5  *
6  * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
7  */
8 public class FreemailPart implements Part {
9
10         private final String emailLocalPart;
11         private final String freemailId;
12         private final String identityId;
13
14         public FreemailPart(String emailLocalPart, String freemailId, String identityId) {
15                 this.emailLocalPart = emailLocalPart;
16                 this.freemailId = freemailId;
17                 this.identityId = identityId;
18         }
19
20         @Override
21         public String getText() {
22                 return String.format("%s@%s.freemail", emailLocalPart, freemailId);
23         }
24
25         public String getEmailLocalPart() {
26                 return emailLocalPart;
27         }
28
29         public String getFreemailId() {
30                 return freemailId;
31         }
32
33         public String getIdentityId() {
34                 return identityId;
35         }
36
37 }