It wasn't used before I started my playing around in that code, but I
assumed it was intended as public API (although that does seem a little
odd really....who would be using it????)
On Thu, 2002-11-28 at 11:59, Holger Hoffstätte wrote:
>
> Is it? It is not used once, nor marked as deprecated. sortedQueries(List)
> is used in ContextCommitObserver.orderQueries, which itself should
> probably be called orderedQueries for consistency reasons..but then again
> there's more inplace sorting going on like sortMaps().
> Do we have a common pattern when to do what (i.e inplace vs. bycopy)? Some
> of these methods in OperationSorter might actually sort parts of the data
> map (or other internals) when done in-place, others return unnecessary
> copies. Probably unimportant for now, but still..
I agree that we should make the naming more consistent... 'ed' suffix
when returning a new copy, without the suffix when sorting inplace. I
think that there is conceivably room for both options at various times,
depending on the situation, e.g. sortEntitiesInIsertOrder vs
sortedEntitiesInInsertOrder. The sorting algorithm would really
struggle to sort in place, hence the recent deprecation of the inplace
algorithm (it creates a new list and then sorts the original list in
place using the new list).
I would, however, say that sorting in place is likely to be more common.
> I'll see if I can get NoUnit or other coverage tools going, so we find
> these dead spots earlier.
Ooo, that would be interesting to see. Can that also see if unit tests
cover everything, or is that another type of tool?
>
> -h
Craig
This archive was generated by hypermail 2.0.0 : Wed Nov 27 2002 - 18:12:13 EST