StringTerm (Java EE 5)

Java EE API


javax.mail.search Class StringTerm

java.lang.Object
  extended by javax.mail.search.SearchTerm
      extended by javax.mail.search.StringTerm
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AddressStringTerm, BodyTerm, HeaderTerm, MessageIDTerm, SubjectTerm

public abstract class StringTerm
extends SearchTerm

Extends: SearchTerm

此类实现 String 的匹配方法。当前的实现仅提供子字符串匹配。我们可以添加比较(比如 strcmp ……)。
英文文档:

This class implements the match method for Strings. The current implementation provides only for substring matching. We could add comparisons (like strcmp ...).

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

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

Field Detail

英文文档:

pattern

protected String pattern
The pattern.


英文文档:

ignoreCase

protected boolean ignoreCase
Ignore case when comparing?

Constructor Detail

protected StringTerm(String pattern)
英文文档:

StringTerm

protected StringTerm(String pattern)

protected StringTerm(String pattern, boolean ignoreCase)
英文文档:

StringTerm

protected StringTerm(String pattern,
                     boolean ignoreCase)
Method Detail

public String getPattern()
返回要与之匹配的字符串。
英文文档:

getPattern

public String getPattern()
Return the string to match with.


public boolean getIgnoreCase()
如果匹配时应该忽略大小写,则返回 true。
英文文档:

getIgnoreCase

public boolean getIgnoreCase()
Return true if we should ignore case when matching.


protected boolean match(String s)
英文文档:

match

protected boolean match(String s)

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