W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2002

Proposal for java-language-binding: use of collections framework

From: Stefan Wachter <Stefan.Wachter@gmx.de>
Date: Sun, 24 Feb 2002 06:26:49 -0500 (EST)
To: www-dom@w3.org
Message-ID: <31303.1014549960@www39.gmx.net>
Dear all!

I propose to use the Java collections framework in the interface for the
NamedNodeMap and the NodeList. The both should have the method

public Collection getNodes();

The advantage of using the collection framework are manifold:
- Takes care for concurrent modifications (while iterating over the
- Provides useful methods for collections (like sorting)
- The collection framework is natural to use in Java

In addition I propose to deprecate the method

public Node getItem(int anIndex)

at the NamedNodeMap because it is akward to implement and is only meant to
have a convient way to iterate over the nodes. But this is exactly no longer
necessary when the collections framework is used.

Thanks for your attention,
Received on Monday, 25 February 2002 12:53:02 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:09 UTC