- java.lang.Object
- 
- jakarta.mail.Address
 
- 
- All Implemented Interfaces:
- java.io.Serializable
 - Direct Known Subclasses:
- InternetAddress,- NewsAddress
 
 public abstract class Address extends java.lang.Object implements java.io.SerializableThis 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:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description Address()Creates a defaultAddress.
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract booleanequals(java.lang.Object address)The equality operator.abstract java.lang.StringgetType()Return a type string that identifies this address type.abstract java.lang.StringtoString()Return a String representation of this address object.
 
- 
- 
- 
Method Detail- 
getTypepublic abstract java.lang.String getType() Return a type string that identifies this address type.- Returns:
- address type
- See Also:
- InternetAddress
 
 - 
toStringpublic abstract java.lang.String toString() Return a String representation of this address object.- Overrides:
- toStringin class- java.lang.Object
- Returns:
- string representation of this address
 
 - 
equalspublic abstract boolean equals(java.lang.Object address) 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 thehashCodemethod that preserves the general contract ofequalsandhashCode- objects that compare as equal must have the same hashCode.- Overrides:
- equalsin class- java.lang.Object
- Parameters:
- address- Address object
 
 
- 
 
-