AddressStringTerm (Java EE 5)

Java EE API


javax.mail.search Class AddressStringTerm

java.lang.Object
  extended by javax.mail.search.SearchTerm
      extended by javax.mail.search.StringTerm
          extended by javax.mail.search.AddressStringTerm
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
FromStringTerm, RecipientStringTerm

public abstract class AddressStringTerm
extends StringTerm


此抽象类实现 Message 地址的字符串比较。

注意,此类与 AddressTerm 类不同,此类比较的是地址字符串,而不是 Address 对象。

英文文档:

This abstract class implements string comparisons for Message addresses.

Note that this class differs from the AddressTerm class in that this class does comparisons on address strings rather than Address objects.

Since:
JavaMail 1.1
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.mail.search.StringTerm
 
Constructor Summary
protected
 
Method Summary
 boolean
protected  boolean
 
Methods inherited from class javax.mail.search.StringTerm
 
Methods inherited from class javax.mail.search.SearchTerm
 
Methods inherited from class java.lang.Object
 

Constructor Detail

protected AddressStringTerm(String pattern)
构造方法。
pattern 要比较的地址模式。
英文文档:

AddressStringTerm

protected AddressStringTerm(String pattern)
Constructor.

Parameters:
pattern - the address pattern to be compared.

Method Detail

protected boolean match(Address a)
检查在构造方法中指定的地址模式是否是给定 Address 对象的字符串表示形式的子字符串。

注意,如果给定 Address 对象的字符串表示形式包含字符集或传输编码,那么在匹配过程中必须将编码考虑在内。

a 比较将应用于此 Address 对象。
return 如果匹配成功,则返回 true;否则返回 false。

英文文档:

match

protected boolean match(Address a)
Check whether the address pattern specified in the constructor is a substring of the string representation of the given Address object.

Note that if the string representation of the given Address object contains charset or transfer encodings, the encodings must be accounted for, during the match process.

Parameters:
a - The comparison is applied to this Address object.
Returns:
true if the match succeeds, otherwise false.

public boolean equals(Object obj)
相等性比较。
英文文档:

equals

public boolean equals(Object obj)
Equality comparison.

Overrides:
equals in class StringTerm


Submit a bug or feature

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

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

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