javax.mail

Class Address

Implemented Interfaces:
Serializable
Known Direct Subclasses:
InternetAddress, NewsAddress

public abstract class Address
extends java.lang.Object
implements Serializable

This abstract class models the addresses in a message. Addresses are Serializable so that they may be serialized along with other search terms.

Method Summary

abstract boolean
equals(Object object)
Subclasses must provide a suitable implementation of equals().
abstract String
getType()
Return a String that identifies this address type.
abstract String
toString()
Subclasses must provide a suitable representation of their address.

Method Details

equals

public abstract boolean equals(Object object)
Subclasses must provide a suitable implementation of equals().
Parameters:
object - the object to compare t
Returns:
true if the subclass determines the other object is equal to this Address

getType

public abstract String getType()
Return a String that identifies this address type.
Returns:
the type of this address

toString

public abstract String toString()
Subclasses must provide a suitable representation of their address.
Returns:
a representation of an Address as a String