Class Mailbox
java.lang.Object
org.apache.james.mime4j.dom.address.Address
org.apache.james.mime4j.dom.address.Mailbox
- All Implemented Interfaces:
Serializable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Stringprivate static final DomainListprivate final Stringprivate final Stringprivate final DomainListprivate static final long -
Constructor Summary
ConstructorsConstructorDescriptionCreates an unnamed mailbox without a route.Creates a named mailbox without a route.Mailbox(String name, DomainList route, String localPart, String domain) Creates a named mailbox with a route.Creates a named mailbox based on an unnamed mailbox.Mailbox(DomainList route, String localPart, String domain) Creates an unnamed mailbox with a route. -
Method Summary
Modifier and TypeMethodDescriptionprotected final voiddoAddMailboxesTo(List<Mailbox> results) Adds any mailboxes represented by this address into the given List.booleanIndicates whether some other object is "equal to" this mailbox.Returns the address in the form localPart@domain.Returns the right part of the e-mail address (after "@").Returns the left part of the e-mail address (before "@").getName()Returns the name of the mailbox ornullif it does not have a name.getRoute()Returns the route list.inthashCode()toString()Methods inherited from class Address
addMailboxesTo
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
EMPTY_ROUTE_LIST
-
name
-
route
-
localPart
-
domain
-
-
Constructor Details
-
Mailbox
Creates a named mailbox with a route. Routes are obsolete.- Parameters:
name- the name of the e-mail address. May benull.route- The zero or more domains that make up the route. May benull.localPart- The part of the e-mail address to the left of the "@".domain- The part of the e-mail address to the right of the "@".
-
Mailbox
-
Mailbox
-
Mailbox
Creates an unnamed mailbox with a route. Routes are obsolete.- Parameters:
route- The zero or more domains that make up the route. May benull.localPart- The part of the e-mail address to the left of the "@".domain- The part of the e-mail address to the right of the "@".
-
Mailbox
Creates a named mailbox without a route. Routes are obsolete.- Parameters:
name- the name of the e-mail address. May benull.localPart- The part of the e-mail address to the left of the "@".domain- The part of the e-mail address to the right of the "@".
-
-
Method Details
-
getName
Returns the name of the mailbox ornullif it does not have a name. -
getRoute
Returns the route list. If the mailbox does not have a route an empty domain list is returned. -
getLocalPart
Returns the left part of the e-mail address (before "@"). -
getDomain
Returns the right part of the e-mail address (after "@"). -
getAddress
Returns the address in the form localPart@domain.- Returns:
- the address part of this mailbox.
-
doAddMailboxesTo
Description copied from class:AddressAdds any mailboxes represented by this address into the given List. Must be overridden by concrete subclasses.- Specified by:
doAddMailboxesToin classAddress
-
hashCode
-
equals
Indicates whether some other object is "equal to" this mailbox.An object is considered to be equal to this mailbox if it is an instance of class
Mailboxthat holds the same address as this one. The domain is considered to be case-insensitive but the local-part is not (because of RFC 5321: the local-part of a mailbox MUST BE treated as case sensitive). -
toString
-