You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Gary D. Gregory (Jira)" <xe...@xml.apache.org> on 2022/02/23 11:16:00 UTC
[jira] [Comment Edited] (XERCESJ-1740) Make implementations of DOM collections (e.g.: `org.w3c.dom.NodeList`, etc.) implement `java.lang.Iterable`
[ https://issues.apache.org/jira/browse/XERCESJ-1740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17496679#comment-17496679 ]
Gary D. Gregory edited comment on XERCESJ-1740 at 2/23/22, 11:15 AM:
---------------------------------------------------------------------
That is quite a coincidence! I just ran into code yesterday where using a node list in a Java 5 for each loop or better, a Java 8 stream, is exactly what I wanted to do!
[~mukul_gandhi], Iterable was added in Java 5.
was (Author: garydgregory):
That is quite a coincidence! I just ran into code yesterday where using a node list in a Java 5 for each loop or better, a Java 8 stream, is exactly what I wanted to do!
> Make implementations of DOM collections (e.g.: `org.w3c.dom.NodeList`, etc.) implement `java.lang.Iterable`
> -----------------------------------------------------------------------------------------------------------
>
> Key: XERCESJ-1740
> URL: https://issues.apache.org/jira/browse/XERCESJ-1740
> Project: Xerces2-J
> Issue Type: New Feature
> Components: DOM (HTML), DOM (Level 3 Core)
> Affects Versions: 2.12.2
> Reporter: ExE Boss
> Priority: Major
>
> Make the classes that implement the following DOM collection interfaces also implement implement [{{java.lang.Iterable}}|https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Iterable.html] with the {{T}} type parameter being set to the return type of the {{item(int)}} method:
> - [{{org.w3c.dom.DOMImplementationList}}|https://docs.oracle.com/en/java/javase/17/docs/api/java.xml/org/w3c/dom/DOMImplementationList.html]
> - [{{org.w3c.dom.DOMStringList}}|https://docs.oracle.com/en/java/javase/17/docs/api/java.xml/org/w3c/dom/DOMStringList.html]
> - [{{org.w3c.dom.NamedNodeMap}}|https://docs.oracle.com/en/java/javase/17/docs/api/java.xml/org/w3c/dom/NamedNodeMap.html]
> - [{{org.w3c.dom.NodeList}}|https://docs.oracle.com/en/java/javase/17/docs/api/java.xml/org/w3c/dom/NodeList.html]
> - [{{org.w3c.dom.html.HTMLCollection}}|https://docs.oracle.com/en/java/javase/17/docs/api/jdk.xml.dom/org/w3c/dom/html/HTMLCollection.html]
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org