Simon B schrieb:

> I apologise if this is a stupid question, or If I'm missing something,
> but why doesn't
> com.google.gwt.xml.client.NodeList
> extend
> java.util.Iterator

Because no List (java.util.List or java.awt.List) do.

> it would be handy as then NodeList could be used with the shortened
> for each block a la:
> for (Node aNode : nodeList) {

So you mean java.util.Iterable as being described e.g. in
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Iterable.html

> Rather than
> for (int i = 0; i < nodeList.length(); i++) {
>      Node aNode = nodeList.item(i);
>      ....
> }
> It seems a really obvious oversight, so I'm sure that there's a good
> reason, I'd just like to know what it is.

I don't know the reason but you might ask SUN, why they don't do
the same for their GUI-elements like
http://java.sun.com/j2se/1.5.0/docs/api/java/awt/List.html
or
http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/JList.html


Regards, Lothar

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to