geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Strachan <james_strac...@yahoo.co.uk>
Subject Re: [General] Container interface and AbstractContainer
Date Thu, 14 Aug 2003 12:28:03 GMT

On Thursday, August 14, 2003, at 01:25  pm, Jason Dillon wrote:

> If the list should not be mutable, then it makes more sense to return 
> an Iterator (or ListIterator as mentioned), else someone could violate 
> the contract and insert random fluff into the list instead of using 
> the add/remove methods.

If its gonna be immutable then we could just return a 
Collections.unmodifiableList(list); Then folks can use the full List 
API (bar modifications).

Also if we ever decide to allow a mutable List later on its not a 
change to the API :)

James
-------
http://radio.weblogs.com/0112098/


Mime
View raw message