🎨 Replace SoneParserTest 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 public class FreemailPart implements Part {
7
8         private final String emailLocalPart;
9         private final String freemailId;
10         private final String identityId;
11
12         public FreemailPart(String emailLocalPart, String freemailId, String identityId) {
13                 this.emailLocalPart = emailLocalPart;
14                 this.freemailId = freemailId;
15                 this.identityId = identityId;
16         }
17
18         @Override
19         public String getText() {
20                 return String.format("%s@%s.freemail", emailLocalPart, freemailId);
21         }
22
23         public String getEmailLocalPart() {
24                 return emailLocalPart;
25         }
26
27         public String getFreemailId() {
28                 return freemailId;
29         }
30
31         public String getIdentityId() {
32                 return identityId;
33         }
34
35 }