|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.mail.search Class AddressStringTerm
java.lang.Objectjavax.mail.search.SearchTerm
javax.mail.search.StringTerm
javax.mail.search.AddressStringTerm
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- FromStringTerm, RecipientStringTerm
public abstract class AddressStringTerm
- extends StringTerm
Extends:
SearchTerm > StringTerm
Extended by:
FromStringTerm, RecipientStringTerm
此抽象类实现 Message 地址的字符串比较。
注意,此类与 AddressTerm
类不同,此类比较的是地址字符串,而不是 Address 对象。
since |
|
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 |
---|
ignoreCase, pattern |
Constructor Summary | |
---|---|
protected |
AddressStringTerm(String pattern)
Constructor. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
Equality comparison. |
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. |
Methods inherited from class javax.mail.search.StringTerm |
---|
getIgnoreCase, getPattern, hashCode, match |
Methods inherited from class javax.mail.search.SearchTerm |
---|
match |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
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 classStringTerm
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Submit a bug or feature
Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!