Class Destination
- All Implemented Interfaces:
Serializable
,Cloneable
Represents the destination of the message, consisting of To:, CC:, and BCC: fields.
By default, the string must be 7-bit ASCII. If the text must contain any
other characters, then you must use MIME encoded-word syntax (RFC 2047)
instead of a literal string. MIME encoded-word syntax uses the following
form: =?charset?encoding?encoded-text?=
. For more information,
see RFC 2047.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for Destination object.Destination
(List<String> toAddresses) Constructs a new Destination object. -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
The BCC: field(s) of the message.The CC: field(s) of the message.The To: field(s) of the message.int
hashCode()
void
setBccAddresses
(Collection<String> bccAddresses) The BCC: field(s) of the message.void
setCcAddresses
(Collection<String> ccAddresses) The CC: field(s) of the message.void
setToAddresses
(Collection<String> toAddresses) The To: field(s) of the message.toString()
Returns a string representation of this object; useful for testing and debugging.withBccAddresses
(String... bccAddresses) The BCC: field(s) of the message.withBccAddresses
(Collection<String> bccAddresses) The BCC: field(s) of the message.withCcAddresses
(String... ccAddresses) The CC: field(s) of the message.withCcAddresses
(Collection<String> ccAddresses) The CC: field(s) of the message.withToAddresses
(String... toAddresses) The To: field(s) of the message.withToAddresses
(Collection<String> toAddresses) The To: field(s) of the message.
-
Constructor Details
-
Destination
public Destination()Default constructor for Destination object. Callers should use the setter or fluent setter (with...) methods to initialize the object after creating it. -
Destination
Constructs a new Destination object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.- Parameters:
toAddresses
- The To: field(s) of the message.
-
-
Method Details
-
getToAddresses
The To: field(s) of the message.
- Returns:
- The To: field(s) of the message.
-
setToAddresses
The To: field(s) of the message.
- Parameters:
toAddresses
- The To: field(s) of the message.
-
withToAddresses
The To: field(s) of the message.
NOTE: This method appends the values to the existing list (if any). Use
setToAddresses(java.util.Collection)
orwithToAddresses(java.util.Collection)
if you want to override the existing values.- Parameters:
toAddresses
- The To: field(s) of the message.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withToAddresses
The To: field(s) of the message.
- Parameters:
toAddresses
- The To: field(s) of the message.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getCcAddresses
The CC: field(s) of the message.
- Returns:
- The CC: field(s) of the message.
-
setCcAddresses
The CC: field(s) of the message.
- Parameters:
ccAddresses
- The CC: field(s) of the message.
-
withCcAddresses
The CC: field(s) of the message.
NOTE: This method appends the values to the existing list (if any). Use
setCcAddresses(java.util.Collection)
orwithCcAddresses(java.util.Collection)
if you want to override the existing values.- Parameters:
ccAddresses
- The CC: field(s) of the message.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withCcAddresses
The CC: field(s) of the message.
- Parameters:
ccAddresses
- The CC: field(s) of the message.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getBccAddresses
The BCC: field(s) of the message.
- Returns:
- The BCC: field(s) of the message.
-
setBccAddresses
The BCC: field(s) of the message.
- Parameters:
bccAddresses
- The BCC: field(s) of the message.
-
withBccAddresses
The BCC: field(s) of the message.
NOTE: This method appends the values to the existing list (if any). Use
setBccAddresses(java.util.Collection)
orwithBccAddresses(java.util.Collection)
if you want to override the existing values.- Parameters:
bccAddresses
- The BCC: field(s) of the message.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withBccAddresses
The BCC: field(s) of the message.
- Parameters:
bccAddresses
- The BCC: field(s) of the message.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
-