作者:你是我最终的荒唐 | 来源:互联网 | 2023-10-14 16:17
本文整理了Java中javax.mail.search.AddressTerm.getAddress()
方法的一些代码示例,展示了AddressTerm.getAddress()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AddressTerm.getAddress()
方法的具体详情如下:
包路径:javax.mail.search.AddressTerm
类名称:AddressTerm
方法名:getAddress
AddressTerm.getAddress介绍
[英]Return the address to match with.
[中]返回要匹配的地址。
代码示例
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* Check if the "text" terms in the given SearchTerm contain
* non US-ASCII characters.
*
* @param term the search term
* @return true if only ASCII
*/
public static boolean isAscii(SearchTerm term) {
if (term instanceof AndTerm)
return isAscii(((AndTerm)term).getTerms());
else if (term instanceof OrTerm)
return isAscii(((OrTerm)term).getTerms());
else if (term instanceof NotTerm)
return isAscii(((NotTerm)term).getTerm());
else if (term instanceof StringTerm)
return isAscii(((StringTerm)term).getPattern());
else if (term instanceof AddressTerm)
return isAscii(((AddressTerm)term).getAddress().toString());
// Any other term returns true.
return true;
}
代码示例来源:origin: com.sun.mail/javax.mail
/**
* Check if the "text" terms in the given SearchTerm contain
* non US-ASCII characters.
*
* @param term the search term
* @return true if only ASCII
*/
public static boolean isAscii(SearchTerm term) {
if (term instanceof AndTerm)
return isAscii(((AndTerm)term).getTerms());
else if (term instanceof OrTerm)
return isAscii(((OrTerm)term).getTerms());
else if (term instanceof NotTerm)
return isAscii(((NotTerm)term).getTerm());
else if (term instanceof StringTerm)
return isAscii(((StringTerm)term).getPattern());
else if (term instanceof AddressTerm)
return isAscii(((AddressTerm)term).getAddress().toString());
// Any other term returns true.
return true;
}
代码示例来源:origin: javax.mail/com.springsource.javax.mail
public static boolean isAscii(SearchTerm term) {
if (term instanceof AndTerm || term instanceof OrTerm) {
SearchTerm[] terms;
if (term instanceof AndTerm)
terms = ((AndTerm)term).getTerms();
else
terms = ((OrTerm)term).getTerms();
for (int i = 0; i if (!isAscii(terms[i])) // outta here !
return false;
} else if (term instanceof NotTerm)
return isAscii(((NotTerm)term).getTerm());
else if (term instanceof StringTerm)
return isAscii(((StringTerm)term).getPattern());
else if (term instanceof AddressTerm)
return isAscii(((AddressTerm)term).getAddress().toString());
// Any other term returns true.
return true;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.javax.mail
static boolean isAscii(SearchTerm term) {
if (term instanceof AndTerm || term instanceof OrTerm) {
SearchTerm[] terms;
if (term instanceof AndTerm)
terms = ((AndTerm)term).getTerms();
else
terms = ((OrTerm)term).getTerms();
for (int i = 0; i if (!isAscii(terms[i])) // outta here !
return false;
} else if (term instanceof NotTerm)
return isAscii(((NotTerm)term).getTerm());
else if (term instanceof StringTerm)
return isAscii(((StringTerm)term).getPattern());
else if (term instanceof AddressTerm)
return isAscii(((AddressTerm)term).getAddress().toString());
// Any other term returns true.
return true;
}
代码示例来源:origin: org.glassfish.metro/webservices-extra
/**
* Check if the "text" terms in the given SearchTerm contain
* non US-ASCII characters.
*
* @param term the search term
* @return true if only ASCII
*/
public static boolean isAscii(SearchTerm term) {
if (term instanceof AndTerm)
return isAscii(((AndTerm)term).getTerms());
else if (term instanceof OrTerm)
return isAscii(((OrTerm)term).getTerms());
else if (term instanceof NotTerm)
return isAscii(((NotTerm)term).getTerm());
else if (term instanceof StringTerm)
return isAscii(((StringTerm)term).getPattern());
else if (term instanceof AddressTerm)
return isAscii(((AddressTerm)term).getAddress().toString());
// Any other term returns true.
return true;
}
代码示例来源:origin: com.sun.mail/jakarta.mail
/**
* Check if the "text" terms in the given SearchTerm contain
* non US-ASCII characters.
*
* @param term the search term
* @return true if only ASCII
*/
public static boolean isAscii(SearchTerm term) {
if (term instanceof AndTerm)
return isAscii(((AndTerm)term).getTerms());
else if (term instanceof OrTerm)
return isAscii(((OrTerm)term).getTerms());
else if (term instanceof NotTerm)
return isAscii(((NotTerm)term).getTerm());
else if (term instanceof StringTerm)
return isAscii(((StringTerm)term).getPattern());
else if (term instanceof AddressTerm)
return isAscii(((AddressTerm)term).getAddress().toString());
// Any other term returns true.
return true;
}
代码示例来源:origin: com.sun.mail/android-mail
/**
* Check if the "text" terms in the given SearchTerm contain
* non US-ASCII characters.
*
* @param term the search term
* @return true if only ASCII
*/
public static boolean isAscii(SearchTerm term) {
if (term instanceof AndTerm)
return isAscii(((AndTerm)term).getTerms());
else if (term instanceof OrTerm)
return isAscii(((OrTerm)term).getTerms());
else if (term instanceof NotTerm)
return isAscii(((NotTerm)term).getTerm());
else if (term instanceof StringTerm)
return isAscii(((StringTerm)term).getPattern());
else if (term instanceof AddressTerm)
return isAscii(((AddressTerm)term).getAddress().toString());
// Any other term returns true.
return true;
}
代码示例来源:origin: jboss/jboss-javaee-specs
/**
* Check if the "text" terms in the given SearchTerm contain
* non US-ASCII characters.
*
* @param term the search term
* @return true if only ASCII
*/
public static boolean isAscii(SearchTerm term) {
if (term instanceof AndTerm)
return isAscii(((AndTerm)term).getTerms());
else if (term instanceof OrTerm)
return isAscii(((OrTerm)term).getTerms());
else if (term instanceof NotTerm)
return isAscii(((NotTerm)term).getTerm());
else if (term instanceof StringTerm)
return isAscii(((StringTerm)term).getPattern());
else if (term instanceof AddressTerm)
return isAscii(((AddressTerm)term).getAddress().toString());
// Any other term returns true.
return true;
}
代码示例来源:origin: org.apache.geronimo.javamail/geronimo-javamail_1.4_provider
return checkStringEncoding(((AddressTerm)term).getAddress().toString());