jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting (JIRA)" <j...@apache.org>
Subject [jira] Reopened: (JCR-2120) Make RangeIterator extend java.lang.Iterable
Date Wed, 20 May 2009 08:33:45 GMT

     [ https://issues.apache.org/jira/browse/JCR-2120?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Jukka Zitting reopened JCR-2120:

      Assignee: Jukka Zitting

Actually, as discussed (f2f) this morning with Thomas, what we could do is add a utility class
in jcr-commons that does something like this:

    for (Node child : JcrUtils.childNodes(node)) {
        // ...

The childNodes() method would be implemented like this (quick draft):

    public static Iterable<Node> childNodes(final Node node) {
        return new Iterable<Node>() {
                public Iterator<Node> iterator() {
                    return (Iterator<Node>) node.getNodes();

We could have similar methods for all the child node and property access methods, as well
as other JCR iterators.

> Make RangeIterator extend java.lang.Iterable
> --------------------------------------------
>                 Key: JCR-2120
>                 URL: https://issues.apache.org/jira/browse/JCR-2120
>             Project: Jackrabbit Content Repository
>          Issue Type: New Feature
>          Components: JCR API
>            Reporter: David Purpura
>            Assignee: Jukka Zitting
> Make javax.jcr.RangeIterator extend java.lang.Iterable in order to enable foreach loops
on implementations of RangeIterator.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message