Address (Java EE 5)

Java EE API


javax.mail Class Address

java.lang.Object
  extended by javax.mail.Address
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
InternetAddress, NewsAddress

public abstract class Address
extends Object
implements Serializable

Implements: java.io.Serializable

此抽象类模拟消息中的地址。子类提供特定实现。子类通常将是可序列化的,这样,(例如)搜索项中的 Address 对象的使用可以随搜索项一起被序列化。
英文文档:

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
 
Method Summary
abstract  boolean
abstract  String
abstract  String
 
Methods inherited from class java.lang.Object
 

Constructor Detail

public Address()
英文文档:

Address

public Address()
Method Detail

abstract public String getType()
返回标识此地址类型的类型字符串。
return 地址类型
See also javax.mail.internet.InternetAddress
英文文档:

getType

public abstract String getType()
Return a type string that identifies this address type.

Returns:
address type
See Also:
InternetAddress

abstract public String toString()
返回此 Address 对象的 String 表示形式。
return 此地址的字符串表示形式
英文文档:

toString

public abstract String toString()
Return a String representation of this address object.

Overrides:
toString in class Object
Returns:
string representation of this address

abstract public boolean equals(Object address)
等号运算符。子类应该提供此方法的实现,该方法支持值相等性(这两个 Address 对象表示相同的目标吗?),而不支持对象引用相等性。子类还必须提供相应的 hashCode 方法的实现,该方法保留 equalshashCode 的常规协定 - 比较起来相等的对象必须具有相同的 hashCode。
address Address 对象
英文文档:

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


Submit a bug or feature

Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.

一看就知道只有菜鸟才干这么无知的事啦。

PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!