本文整理汇总了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;未经允许,请勿转载。 |
请发表评论