commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arron Bates" <>
Subject Re: [collections] - Few more collections for the masses... (Lazy collections)
Date Thu, 23 May 2002 03:30:13 GMT
> A few comments:
> 1) StandardFactory in LazyCollections. It may be better to have a
> FactoryUtils, or to add to one of the other static classes in the package so
> that a group of factory implementations can be created.

Fair enough. Done.

> 2) clean() cannot be implemented on LazyList, as the factory only returns
> List thus the method cannot be accessed. clean() would become a static
> method taking in List.

Very true. Now moved.

> 3) What should the iterators do? If the get methods are not supposed to
> return nulls, should the iterators do the same. If so then you will need an
> Iterator and ListIterator wrapper.
> 4) What should Map's values() and entrySet() do? They may be OK, but I'm not
> sure. If you do map.set("A", null), the values() will contain null. Should
> that create an object if queried? This is tied up with the iterator
> question.

3 & 4) It's not that it's never meant to return null, but where an object is
expected to be at an address (key or index) and is not.

For example the Struts problem... request comes in, and the bean collections
wont get updated, because when the system expects an object to be at an
address, it's not there. ie: "I want the object at i", should give an object.
"Give me the object for key", should give an object. Getting all the keys or
an iterator, it's more like they're after a snapshot of the collection rather
than having an expectation of a particular object being at an address.

> 5) SortedMap's subMap, tailMap and headMap should return LazySortedMaps as
> with subList


> 6) SimpleObjectFactory - javadoc error:
> * Method by which a system can call hand have an object created.

Tough crowd!  :)

New code...


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message