本文整理汇总了Java中org.apache.commons.collections4.iterators.IteratorEnumeration类的典型用法代码示例。如果您正苦于以下问题:Java IteratorEnumeration类的具体用法?Java IteratorEnumeration怎么用?Java IteratorEnumeration使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IteratorEnumeration类属于org.apache.commons.collections4.iterators包,在下文中一共展示了IteratorEnumeration类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getAttributeNames
import org.apache.commons.collections4.iterators.IteratorEnumeration; //导入依赖的package包/类
/**
* @inheritDoc
*/
public Enumeration getAttributeNames()
{
Set<String> nonPortableAttributeNames = m_nonPortalSession.getAllAttributes().keySet();
IteratorChain ic = new IteratorChain(m_attributes.keySet().iterator(),nonPortableAttributeNames.iterator());
return new IteratorEnumeration(ic);
}
示例2: enumerate
import org.apache.commons.collections4.iterators.IteratorEnumeration; //导入依赖的package包/类
public Enumeration<TreeObject> enumerate() {
return new IteratorEnumeration<TreeObject>(path.iterator());
}
示例3: children
import org.apache.commons.collections4.iterators.IteratorEnumeration; //导入依赖的package包/类
public Enumeration<TreeObject> children() {
return new IteratorEnumeration<TreeObject>(children.iterator());
}
示例4: getAttributeNames
import org.apache.commons.collections4.iterators.IteratorEnumeration; //导入依赖的package包/类
/**
* @inheritDoc
*/
public Enumeration getAttributeNames()
{
IteratorChain ic = new IteratorChain(m_attributes.keySet().iterator(),m_nonPortalSession.getAllAttributes().keySet().iterator());
return new IteratorEnumeration(ic);
}
示例5: asEnumeration
import org.apache.commons.collections4.iterators.IteratorEnumeration; //导入依赖的package包/类
/**
* Gets an enumeration that wraps an iterator.
*
* @param <E> the element type
* @param iterator the iterator to use, may not be null
* @return a new enumeration
* @throws NullPointerException if iterator is null
*/
public static <E> Enumeration<E> asEnumeration(final Iterator<? extends E> iterator) {
if (iterator == null) {
throw new NullPointerException("Iterator must not be null");
}
return new IteratorEnumeration<E>(iterator);
}