> [...]
> + In HTTP, HTTP-SERVER modules use Iterators instead of Enumerators
>
Would it be possible to return Collections or, at the very least,
Iterables instead of Iterators? It's a bit of a pain when an API returns
Iterator because client code is unnecessarily complex. For example:
final Iterator<String> names = request.getHeaderNames();
while (names.hasNext())
{
final String name = names.next();
final String value = request.getHeader(name);
...
}
Instead of:
for (String name : request.getHeaderNames())
{
final String value = request.getHeader(name);
...
}
Matt