JavaScript is disabled on your browser.
-
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- InternetAddress, NewsAddress
public abstract class Address
extends Object
implements Serializable
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:
- Serialized Form
-
-
Constructor Summary
Constructors
Constructor and Description |
Address () |
-
Method Summary
All Methods
Modifier and Type |
Method and Description |
abstract boolean |
equals (Object address)
The equality operator.
|
abstract String |
getType ()
Return a type string that identifies this address type.
|
abstract String |
toString ()
Return a String representation of this address object.
|
-
-
Method Detail
-
equals
public abstract boolean equals(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 the hashCode
method that preserves the general contract of
equals
and hashCode
- objects that
compare as equal must have the same hashCode.
- Overrides:
equals
in class Object
- Parameters:
address
- Address object
Copyright © 1996-2015, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.