热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

javax.mail.search.AddressTerm.getAddress()方法的使用及代码示例

本文整理了Java中javax.mail.search.AddressTerm.getAddress()方法的一些代码示例,展示了AddressTerm.g

本文整理了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());

推荐阅读
author-avatar
你是我最终的荒唐
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有