• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java IteratorChain类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.commons.collections.iterators.IteratorChain的典型用法代码示例。如果您正苦于以下问题:Java IteratorChain类的具体用法?Java IteratorChain怎么用?Java IteratorChain使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IteratorChain类属于org.apache.commons.collections.iterators包,在下文中一共展示了IteratorChain类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: unorderedIterable

import org.apache.commons.collections.iterators.IteratorChain; //导入依赖的package包/类
public Iterable<PE> unorderedIterable() {
    return new Iterable<PE>() {
        @Override
        public Iterator<PE> iterator() {
            return new Iterator<PE>() {
                final private IteratorChain chain = new IteratorChain();

                { // initialize the chain with the unordered iterators of the per sample pileups
                    for ( PileupElementTracker<PE> pet : pileup.values() ) {
                        chain.addIterator(pet.unorderedIterator());
                    }
                }
                @Override
                public boolean hasNext() { return chain.hasNext(); }
                @Override
                public PE next() { return (PE)chain.next(); }
                @Override
                public void remove() { throw new UnsupportedOperationException("Cannot remove"); }
            };
        }
    };
}
 
开发者ID:PAA-NCIC,项目名称:SparkSeq,代码行数:23,代码来源:PileupElementTracker.java


示例2: execute

import org.apache.commons.collections.iterators.IteratorChain; //导入依赖的package包/类
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
	MessageDigest digest;
	try {
		digest = MessageDigest.getInstance(ALGORITHM);
	} catch (NoSuchAlgorithmException e) {
		throw new JobExecutionException("Can't get digest for "+ ALGORITHM);
	}
	String[] types = {
			ResourceType.TYPE_HTML, ResourceType.MIME_TYPE_TEXT, ResourceType.TYPE_UPLOAD
	};
	IteratorChain allFiles = new IteratorChain();
	for (String type : types) {
		Iterator<ContentResource> resourceIterator = new ContentHostingIterator<ContentResource>(type);
		allFiles.addIterator(resourceIterator);
	}
	// Now check all the files.
	ContentResourceChecker checker = new ContentResourceChecker(allFiles, digest);
	checker.check();
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:20,代码来源:ContentCheckJob.java


示例3: toIterator

import org.apache.commons.collections.iterators.IteratorChain; //导入依赖的package包/类
public Iterator toIterator()
{
	switch (size())
	{
           case 0:     return Collections.emptyList().iterator();
		case 1: 	return get(0);
		default: 	return new IteratorChain(this);
	}
}
 
开发者ID:BowlerHatLLC,项目名称:feathers-sdk,代码行数:10,代码来源:IteratorList.java


示例4: getNonStagePropertyInitializerIterator

import org.apache.commons.collections.iterators.IteratorChain; //导入依赖的package包/类
/**
 *
 */
public final Iterator<Initializer> getNonStagePropertyInitializerIterator()
{
    return new FilterIterator(new IteratorChain(root.getPropertyInitializerIterator(false),
            getTopLevelInitializerIterator()), new Predicate()
    {
        public boolean evaluate(Object object)
        {
            if (object instanceof NamedInitializer)
                return (!StandardDefs.isStageProperty(((NamedInitializer)object).getName())) &&
                	      (!((NamedInitializer)object).isDesignLayer());
            return true;
        }
    });
}
 
开发者ID:BowlerHatLLC,项目名称:feathers-sdk,代码行数:18,代码来源:MxmlDocument.java


示例5: getStagePropertyInitializerIterator

import org.apache.commons.collections.iterators.IteratorChain; //导入依赖的package包/类
/**
 *
 */
public final Iterator<Initializer> getStagePropertyInitializerIterator()
{
    return new FilterIterator(new IteratorChain(root.getPropertyInitializerIterator(false),
            getTopLevelInitializerIterator()), new Predicate()
    {
        public boolean evaluate(Object object)
        {
            if (object instanceof NamedInitializer)
                return StandardDefs.isStageProperty(((NamedInitializer)object).getName());
            return false;
        }
    });
}
 
开发者ID:BowlerHatLLC,项目名称:feathers-sdk,代码行数:17,代码来源:MxmlDocument.java


示例6: getPropertyInitializerIterator

import org.apache.commons.collections.iterators.IteratorChain; //导入依赖的package包/类
/**
    * a little trickiness here: we need to initialize both our superclass properties, and document variables that
    * have initializers
    */
public final Iterator<Initializer> getPropertyInitializerIterator()
   {
	return new IteratorChain(root.getPropertyInitializerIterator(false),
               getTopLevelInitializerIterator());
   }
 
开发者ID:BowlerHatLLC,项目名称:feathers-sdk,代码行数:10,代码来源:MxmlDocument.java


示例7: init

import org.apache.commons.collections.iterators.IteratorChain; //导入依赖的package包/类
@Override
public void init() throws MessagingException {
    super.init();
    sieveMailet = new SieveMailet();
    sieveMailet.setUsersRepository(usersRepository);
    sieveMailet.setMailboxManager(mailboxManager);
    sieveMailet.setFileSystem(fileSystem);
    sieveMailet.init(new MailetConfig() {
        /*
         * @see org.apache.mailet.MailetConfig#getInitParameter(java.lang.String)
         */
        public String getInitParameter(String name) {
            if ("addDeliveryHeader".equals(name)) {
                return "Delivered-To";
            } else if ("resetReturnPath".equals(name)) {
                return "true";
            } else {
                return getMailetConfig().getInitParameter(name);
            }
        }
        /*
         * @see org.apache.mailet.MailetConfig#getInitParameterNames()
         */
        public Iterator<String> getInitParameterNames() {
            IteratorChain c = new IteratorChain();
            Collection<String> h = new ArrayList<String>();
            h.add("addDeliveryHeader");
            h.add("resetReturnPath");
            c.addIterator(getMailetConfig().getInitParameterNames());
            c.addIterator(h.iterator());
            return c;
        }
        /*
         * @see org.apache.mailet.MailetConfig#getMailetContext()
         */
        public MailetContext getMailetContext() {
            return getMailetConfig().getMailetContext();
        }
        /*
         * @see org.apache.mailet.MailetConfig#getMailetName()
         */
        public String getMailetName() {
            return getMailetConfig().getMailetName();
        }

    });
    // Override the default value of "quiet"
    sieveMailet.setQuiet(getInitParameter("quiet", true));
    sieveMailet.setFolder(getInitParameter("folder", "INBOX"));
}
 
开发者ID:twachan,项目名称:James,代码行数:51,代码来源:ToRecipientFolder.java


示例8: init

import org.apache.commons.collections.iterators.IteratorChain; //导入依赖的package包/类
/**
 * @see org.apache.mailet.base.GenericMailet#init()
 */
public void init() throws MessagingException {
    
    super.init();

    recipientRewriteTable = new RecipientRewriteTable();
    recipientRewriteTable.setDomainList(domainList);
    recipientRewriteTable.setRecipientRewriteTable(rrt);
    recipientRewriteTable.init(getMailetConfig());
 
    sieveMailet = new SieveMailet();
    sieveMailet.setUsersRepository(usersRepository);
    sieveMailet.setMailboxManager(mailboxManager);
    sieveMailet.setFileSystem(fileSystem);
    sieveMailet.init(new MailetConfig() {
        /*
         * @see org.apache.mailet.MailetConfig#getInitParameter(java.lang.String)
         */
        public String getInitParameter(String name) {
            if ("addDeliveryHeader".equals(name)) {
                return "Delivered-To";
            } else if ("resetReturnPath".equals(name)) {
                return "true";
            } else {
                return getMailetConfig().getInitParameter(name);
            }
        }
        /*
         * @see org.apache.mailet.MailetConfig#getInitParameterNames()
         */
        public Iterator<String> getInitParameterNames() {
            IteratorChain c = new IteratorChain();
            Collection<String> h = new ArrayList<String>();
            h.add("addDeliveryHeader");
            h.add("resetReturnPath");
            c.addIterator(getMailetConfig().getInitParameterNames());
            c.addIterator(h.iterator());
            return c;
        }
        /*
         * @see org.apache.mailet.MailetConfig#getMailetContext()
         */
        public MailetContext getMailetContext() {
            return getMailetConfig().getMailetContext();
        }
        /*
         * @see org.apache.mailet.MailetConfig#getMailetName()
         */
        public String getMailetName() {
            return getMailetConfig().getMailetName();
        }

    });
    // Override the default value of "quiet"
    sieveMailet.setQuiet(getInitParameter("quiet", true));
    sieveMailet.setFolder("INBOX");
    
}
 
开发者ID:twachan,项目名称:James,代码行数:61,代码来源:LocalDelivery.java


示例9: iteratorChain

import org.apache.commons.collections.iterators.IteratorChain; //导入依赖的package包/类
/**
 * Returns an iterator for the concatenation of <code>iterator1</code> and
 * <code>iterator2</code>.
 *
 * @param <T>
 * @param iterator1
 * @param iterator2
 * @return
 */
@SuppressWarnings("unchecked")
public static <T> Iterator<T> iteratorChain(Iterator<? extends T> iterator1, Iterator<? extends T> iterator2) {
    return new IteratorChain(iterator1, iterator2);
}
 
开发者ID:hlta,项目名称:playweb,代码行数:14,代码来源:Iterators.java



注:本文中的org.apache.commons.collections.iterators.IteratorChain类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java FlowBuilder类代码示例发布时间:2022-05-23
下一篇:
Java BIAttribute类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap