Dirk Meier-Eickhoff
unread,May 27, 2011, 9:25:37 AM5/27/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to iDocIt Developers
Hi Jan,
I ran into the "problem" that I need to compare the names of the
Addressees, ThematicRoles and ThematicGrids to find existing names.
Futhermore, I want to order the items by name.
At the moment we use ArrayLists for storing Addressees, ThematicRoles
and ThematicGrids. The lists are sometimes ordered and sometimes not.
In most cases the lists are ordered with Collections.sort() or using
another structure like TreeSet.
If we use all over the programm TreeMaps we have no longer the problem
of sorting the collections. And we can find fast existing names in the
collections. Otherwise, I had to convert the lists to TreeMaps do the
searching and ordering and then reconvert the TreeMap to an ArrayList.
But I don't know what effects the refactoring will have to the
program, because on some places the index of the ArrayLists are used
to find indexes in List composites or we use two synchronous lists
where the index is the linking criterion to the elements in the lists.
That must be checked in detail before.
What do you say about that? Is it ok to have the overhead of
converting the lists to TreeMaps and back or should we refactore the
iDocIt!?
Kind regards
Dirk