Package jakarta.mail
Class Address
java.lang.Object
jakarta.mail.Address
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
InternetAddress
,NewsAddress
This abstract class models the addresses in a message.
Subclasses provide specific implementations. Subclasses
will typically be serializable so that (for example) the
use of Address objects in search terms can be serialized
along with the search terms.
- Author:
- John Mani, Bill Shannon
- See Also:
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
Address
public Address()Creates a defaultAddress
.
-
-
Method Details
-
getType
Return a type string that identifies this address type.- Returns:
- address type
- See Also:
-
toString
Return a String representation of this address object. -
equals
The equality operator. Subclasses should provide an implementation of this method that supports value equality (do the two Address objects represent the same destination?), not object reference equality. A subclass must also provide a corresponding implementation of thehashCode
method that preserves the general contract ofequals
andhashCode
- objects that compare as equal must have the same hashCode.
-