Re: Q. aboutMutableFileSet
Vitezslav Stejskal <[email protected]> Fri, 13 Jun 2003 10:21:40 +0200
| Newsgroups | gmane.comp.java.netbeans.modules.projects.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Svato, Svata Dedic wrote: > Hello, > > > I noticed that MutableFileSet implements List. Thanks to whoever added > the implements clause :) > > I would like to request yet another useful feature to LinkedList: > > public void move(int indexFrom, int indexTo); No problem with this method. > > public void setOrder(int[] permutation); I would suggest to have the setOrder(Object [] contents), because I think that usually clients have the array of objects from the collection somehow sorted and don't want to compute permutation to be able to force collection to remember new order. Or maybe both methods could be available. > > These operations are performed quite often on ordered collections > (such as MutableFileSet is); but unlike FileSets, ordinary Lists do > not fire events during each operation. Without at least move(), it is > not feasible to reorder fileset's contents without outside world > observing the fileset in an inconsistent (== without all the elements) > content. This is interesting, once we add changes notifications anywhere people start to request atomic operations (better with events coalescing). -vita