當前位置: 首頁>>代碼示例>>Java>>正文


Java IteratorUtils.filteredIterator方法代碼示例

本文整理匯總了Java中org.apache.commons.collections.IteratorUtils.filteredIterator方法的典型用法代碼示例。如果您正苦於以下問題:Java IteratorUtils.filteredIterator方法的具體用法?Java IteratorUtils.filteredIterator怎麽用?Java IteratorUtils.filteredIterator使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.apache.commons.collections.IteratorUtils的用法示例。


在下文中一共展示了IteratorUtils.filteredIterator方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: executeQuery

import org.apache.commons.collections.IteratorUtils; //導入方法依賴的package包/類
@Override
@SuppressWarnings({ "unchecked", "rawtypes" })
protected List<?> executeQuery(final ActionContext context) {
    final MembersReportHandler reportHandler = getReportHandler();
    final Pair<MembersTransactionsReportDTO, Iterator<MemberTransactionSummaryReportData>> pair = reportHandler.handleTransactionsSummary(context);
    final MembersTransactionsReportDTO dto = pair.getFirst();
    final Iterator<MemberTransactionSummaryReportData> reportIterator = pair.getSecond();
    final Iterator iterator = IteratorUtils.filteredIterator(reportIterator, new Predicate() {
        @Override
        public boolean evaluate(final Object element) {
            final MemberTransactionSummaryReportData data = (MemberTransactionSummaryReportData) element;
            if (dto.isIncludeNoTraders()) {
                return true;
            }
            return data.isHasData();
        }
    });
    return new IteratorListImpl(iterator);
}
 
開發者ID:mateli,項目名稱:OpenCyclos,代碼行數:20,代碼來源:ExportMembersTransactionsReportToCsvAction.java

示例2: executeQuery

import org.apache.commons.collections.IteratorUtils; //導入方法依賴的package包/類
@Override
@SuppressWarnings({ "unchecked", "rawtypes" })
protected List<?> executeQuery(final ActionContext context) {
    final MembersReportHandler reportHandler = getReportHandler();
    final Pair<MembersTransactionsReportDTO, Iterator<MemberTransactionDetailsReportData>> pair = reportHandler.handleTransactionsDetails(context);
    final MembersTransactionsReportDTO dto = pair.getFirst();
    final Iterator<MemberTransactionDetailsReportData> reportIterator = pair.getSecond();
    final Iterator iterator = IteratorUtils.filteredIterator(reportIterator, new Predicate() {
        @Override
        public boolean evaluate(final Object element) {
            final MemberTransactionDetailsReportData data = (MemberTransactionDetailsReportData) element;
            if (dto.isIncludeNoTraders()) {
                return true;
            }
            return data.getAmount() != null;
        }
    });
    return new IteratorListImpl(iterator);
}
 
開發者ID:mateli,項目名稱:OpenCyclos,代碼行數:20,代碼來源:ExportMembersTransactionsDetailsToCsvAction.java

示例3: getLocalFunctions

import org.apache.commons.collections.IteratorUtils; //導入方法依賴的package包/類
public Iterator getLocalFunctions() {
    return localFunctions == null
    ? IteratorUtils.EMPTY_ITERATOR
    : IteratorUtils.filteredIterator(localFunctions.iterator(),
    new Predicate() {
        public boolean evaluate(Object ob) {
            JsUserDefinedMethod method = (JsUserDefinedMethod) ob;
            return method.definedAsVar && !method.definedInVar;
        }
    });
}
 
開發者ID:vehre,項目名稱:aspa_cscc,代碼行數:12,代碼來源:JsUserDefinedMethod.java

示例4: getProperties

import org.apache.commons.collections.IteratorUtils; //導入方法依賴的package包/類
public Iterator getProperties() {
    return members == null
    ? IteratorUtils.EMPTY_ITERATOR
    : IteratorUtils.filteredIterator(members.values().iterator(),
    new Predicate() {
        public boolean evaluate(Object obj) {
            return obj instanceof Property;
        }
    });
}
 
開發者ID:vehre,項目名稱:aspa_cscc,代碼行數:11,代碼來源:GenericClass.java

示例5: getMethods

import org.apache.commons.collections.IteratorUtils; //導入方法依賴的package包/類
public Iterator getMethods() {
    return members == null
    ? IteratorUtils.EMPTY_ITERATOR
    : IteratorUtils.filteredIterator(members.values().iterator(),
    new Predicate() {
        public boolean evaluate(Object obj) {
            return obj instanceof Method;
        }
    });
}
 
開發者ID:vehre,項目名稱:aspa_cscc,代碼行數:11,代碼來源:GenericClass.java


注:本文中的org.apache.commons.collections.IteratorUtils.filteredIterator方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。