OrTerm (Java EE 5)

Java EE API


javax.mail.search Class OrTerm

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

public final class OrTerm
extends SearchTerm

Extends: SearchTerm

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

This class implements the logical OR 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 OR operator should be applied.

Constructor Detail

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

OrTerm

public OrTerm(SearchTerm t1,
              SearchTerm t2)
Constructor that takes two operands.

Parameters:
t1 - first term
t2 - second term


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

OrTerm

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

Parameters:
t - array of search terms

Method Detail

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

getTerms

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


public boolean match(Message msg)
OR 运算。

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

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

英文文档:

match

public boolean match(Message msg)
The OR operation.

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

Specified by:
match in class SearchTerm
Parameters:
msg - The specified SearchTerms are applied to this Message and the OR operator is applied to their results.
Returns:
true if the OR 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 : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!