Example usage for org.apache.commons.collections.iterators ListIteratorWrapper ListIteratorWrapper

List of usage examples for org.apache.commons.collections.iterators ListIteratorWrapper ListIteratorWrapper

Introduction

In this page you can find the example usage for org.apache.commons.collections.iterators ListIteratorWrapper ListIteratorWrapper.

Prototype

public ListIteratorWrapper(Iterator iterator) 

Source Link

Document

Constructs a new ListIteratorWrapper that will wrap the given iterator.

Usage

From source file:it.greenvulcano.util.xpath.search.jaxen.JaxenXPathAPIImpl.java

/**
 * @see it.greenvulcano.util.xpath.search.XPathAPIImpl#selectNodeIterator(Object,
 *      Object, Object)/*from   ww  w.jav  a2s  .c  om*/
 */
public Object selectNodeIterator(Object contextNode, Object xpath, Object namespaceNode)
        throws TransformerException {
    JaxenXPath lowlevelXPath = (JaxenXPath) xpath;
    try {
        CurrentFunction.putCurrent(contextNode);
        List list = lowlevelXPath.selectNodes(contextNode);
        return contextNode instanceof OMNode ? new ListIteratorWrapper(list.iterator())
                : new JaxenNodeIterator((Node) contextNode, list);
    } catch (JaxenException e) {
        throw new TransformerException(e);
    } finally {
        CurrentFunction.removeCurrent();
    }
}

From source file:org.onexus.website.api.utils.reflection.ListComposer.java

@Override
public ListIterator<T> listIterator() {
    return new ListIteratorWrapper(iterator());
}