I think all three names are clear enough (no pun intended). The problem is that Container implements Sequence, which carries a different implication for clear(). I suspect that it would not be as confusing if Container *had* a component collection, rather than *being* a component collection.
G On Jan 21, 2011, at 3:55 PM, Bill van Melle wrote: > On Fri, Jan 21, 2011 at 6:17 AM, Greg Brown <[email protected]> wrote: > I just realized that the clear() method is doing exactly what it is supposed > to. clear() doesn't actually have anything to do with the child components - > it is used for data binding (it is analogous to load() and store(), but > "clears" the bound content). > > Wow, what a bad name! Let's see, the very familiar ArrayList has a > getLength() method, which returns the number of elements, and a clear() > method, which removes them all. Container has a getLength() method, which > returns the number of components, and a clear() method, which, um, does > something funky with bindings. > > Not that "load" and "store" are great names, either. Way too brief for what > they're doing. Oh well, I guess we're stuck with them now.
