AndTerm (Java EE 5)

Java EE API


javax.mail.search Class AndTerm

java.lang.Object
  extended by javax.mail.search.SearchTerm
      extended by javax.mail.search.AndTerm
All Implemented Interfaces:
Serializable

public final class AndTerm
extends SearchTerm

Extends: SearchTerm

此类实现单个 SearchTermsThis 上的逻辑 AND 运算符。
英文文档:

This class implements the logical AND operator on individual SearchTerms.

Author:
Bill Shannon, John Mani
See Also:
Serialized Form

Field Summary
protected  SearchTerm[]
 
Constructor Summary
 
Method Summary
 boolean
 SearchTerm[]
 int
 boolean
 
Methods inherited from class java.lang.Object
 

Field Detail

英文文档:

terms

protected SearchTerm[] terms
The array of terms on which the AND operator should be applied.

Constructor Detail

public AndTerm(SearchTerm t1, SearchTerm t2)
带有两个条目的构造方法。
t1 第一个条目
t2 第二个条目
英文文档:

AndTerm

public AndTerm(SearchTerm t1,
               SearchTerm t2)
Constructor that takes two terms.

Parameters:
t1 - first term
t2 - second term


public AndTerm(SearchTerm[] t)
带 SearchTerm 数组的构造方法。
t 条目数组
英文文档:

AndTerm

public AndTerm(SearchTerm[] t)
Constructor that takes an array of SearchTerms.

Parameters:
t - array of terms

Method Detail

public SearchTerm[] getTerms()
返回搜索条目。
英文文档:

getTerms

public SearchTerm[] getTerms()
Return the search terms.


public boolean match(Message msg)
AND 操作。

构造方法中指定的条目将应用于给定的对象,AND 运算符应用于这些条目的结果。

msg 指定的 SearchTerm 将应用于此 Message,AND 运算符应用于其结果。
return 如果 AND 运算成功,则返回 true;否则返回 false。

英文文档:

match

public boolean match(Message msg)
The AND operation.

The terms specified in the constructor are applied to the given object and the AND operator is applied to their results.

Specified by:
match in class SearchTerm
Parameters:
msg - The specified SearchTerms are applied to this Message and the AND operator is applied to their results.
Returns:
true if the AND succeds, otherwise false

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

equals

public boolean equals(Object obj)
Equality comparison.

Overrides:
equals in class Object

public int hashCode()
计算此对象的 hashCode。
英文文档:

hashCode

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

Overrides:
hashCode in class Object


Submit a bug or feature

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

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

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