BrightSide Workbench Full Report + Source Code
org.turro.mail.impl.Recipient Class Reference

Public Member Functions

Recipient friendly (String friendly)
 
Recipient formal (String formal)
 
String getEmail ()
 
String getName ()
 
String getFriendly ()
 
String getFormal ()
 
boolean isEmpty ()
 
String parse (String text)
 

Static Public Member Functions

static Recipient of (IContact contact)
 
static Recipient of (String email, String name)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 29 of file Recipient.java.

Member Function Documentation

◆ formal()

Recipient org.turro.mail.impl.Recipient.formal ( String  formal)

Definition at line 36 of file Recipient.java.

36  {
37  this.formal = formal;
38  return this;
39  }

◆ friendly()

Recipient org.turro.mail.impl.Recipient.friendly ( String  friendly)

Definition at line 31 of file Recipient.java.

31  {
32  this.friendly = friendly;
33  return this;
34  }

◆ getEmail()

String org.turro.mail.impl.Recipient.getEmail ( )

Definition at line 41 of file Recipient.java.

41  {
42  return email;
43  }
Here is the caller graph for this function:

◆ getFormal()

String org.turro.mail.impl.Recipient.getFormal ( )

Definition at line 53 of file Recipient.java.

53  {
54  return formal;
55  }

◆ getFriendly()

String org.turro.mail.impl.Recipient.getFriendly ( )

Definition at line 49 of file Recipient.java.

49  {
50  return friendly;
51  }

◆ getName()

String org.turro.mail.impl.Recipient.getName ( )

Definition at line 45 of file Recipient.java.

45  {
46  return name;
47  }

◆ isEmpty()

boolean org.turro.mail.impl.Recipient.isEmpty ( )

Definition at line 57 of file Recipient.java.

57  {
58  return Strings.isBlank(email);
59  }
Here is the caller graph for this function:

◆ of() [1/2]

static Recipient org.turro.mail.impl.Recipient.of ( IContact  contact)
static

Definition at line 81 of file Recipient.java.

81  {
82  return Recipient.of(contact.getEmail(), contact.getName())
83  .friendly(contact.getFriendly())
84  .formal(contact.getFormal());
85  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ of() [2/2]

static Recipient org.turro.mail.impl.Recipient.of ( String  email,
String  name 
)
static

Definition at line 87 of file Recipient.java.

87  {
88  return new Recipient(email, name);
89  }

◆ parse()

String org.turro.mail.impl.Recipient.parse ( String  text)

Definition at line 63 of file Recipient.java.

63  {
64  if(!Strings.isBlank(email)) {
65  text = text.replaceAll("\\{email\\}", email);
66  }
67  if(!Strings.isBlank(name)) {
68  text = text.replaceAll("\\{name\\}", name);
69  }
70  if(!Strings.isBlank(friendly)) {
71  text = text.replaceAll("\\{friendly\\}", friendly);
72  }
73  if(!Strings.isBlank(formal)) {
74  text = text.replaceAll("\\{formal\\}", formal);
75  }
76  return text;
77  }
Here is the caller graph for this function:

The documentation for this class was generated from the following file: