RecipientStringTerm (Java EE 5 SDK)

Java

Java EE 5 SDK

深圳电信培训中心.徐海蛟老师.


javax.mail.search Class RecipientStringTerm

java.lang.Object
  extended by javax.mail.search.SearchTerm
      extended by javax.mail.search.StringTerm
          extended by javax.mail.search.AddressStringTerm
              extended by javax.mail.search.RecipientStringTerm
所有已实现的接口:
Serializable

public final class RecipientStringTerm
extends AddressStringTerm

This class implements string comparisons for the Recipient Address headers.

Note that this class differs from the RecipientTerm class in that this class does comparisons on address strings rather than Address objects. The string comparisons are case-insensitive.

从以下版本开始:
JavaMail 1.1
另请参见:
Serialized Form

字段摘要
 
Fields inherited from class javax.mail.search.StringTerm
ignoreCase, pattern
 
构造器摘要
RecipientStringTerm(Message.RecipientType type, String pattern)
          Constructor.
 
方法摘要
 boolean equals(Object obj)
          Equality comparison.
 Message.RecipientType getRecipientType()
          Return the type of recipient to match with.
 int hashCode()
          Compute a hashCode for this object.
 boolean match(Message msg)
          Check whether the address specified in the constructor is a substring of the recipient address of this Message.
 
类方法继承 javax.mail.search.AddressStringTerm
match
 
类方法继承 javax.mail.search.StringTerm
getIgnoreCase, getPattern, match
 
类方法继承 java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

构造器详细信息

RecipientStringTerm

public RecipientStringTerm(Message.RecipientType type,
                           String pattern)
Constructor.

参数:
type - the recipient type
pattern - the address pattern to be compared.

方法详细信息

getRecipientType

public Message.RecipientType getRecipientType()
Return the type of recipient to match with.


match

public boolean match(Message msg)
Check whether the address specified in the constructor is a substring of the recipient address of this Message.

规范说明:
match in class SearchTerm
参数:
msg - The comparison is applied to this Message's recipient address.
返回:
true if the match succeeds, otherwise false.

equals

public boolean equals(Object obj)
Equality comparison.

重写:
equals in class AddressStringTerm

hashCode

public int hashCode()
Compute a hashCode for this object.

重写:
hashCode in class StringTerm

Java EE 5 SDK

深圳电信培训中心.徐海蛟老师.


提交错误或意见

版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。深圳电信培训中心.徐海蛟老师教学参考.