From: Kal A. <ka...@te...> - 2001-07-09 08:38:29
|
Hi Gerd, I don't know how I managed to miss this message ... sorry for the delay in replying. I think that using a hashmap internally for Topic.rolesPlayed and Member.player attributes might be a useful thing to do, and as you note, it would enable a more convenient removeXXX() operation. However, it should be noted that from an XTM spec point of view, this would not be sufficient to meet the requirements to suppress duplicate players of roles in an association. Also, I wonder about the time and space overhead of the use of a HashMap in the in-memory implementation when the index would really only be used for removals. So my position would be +1 to adding the suggested operations to the interface but -1 on using a HashMap for the in-memory implementation (I don't yet know enough about Ozone internals to determine the best course of action for that implementation). Cheers, Kal > -----Original Message----- > From: tm4...@li... > [mailto:tm4...@li...]On Behalf Of Gerd > Mueller > Sent: 02 July 2001 14:22 > To: tm4...@li... > Subject: [Tm4j-developers] Suggestion regarding players > > > > Hi, > > I've got a suggestion regarding the player-member management: > > At the moment the players of a member and the roles played by a > topic are managed with an ArrayList. I would suggest to use a > HashMap where the keys are the id's. Then we could add > Member.removePlayer( Topic ) and Topic.removeRolePlayed( Member ) > methods with a good complexity. This would also avoid adding > a player multiple times to a member. > > Best Regards, > Gerd > > -- > ________________________________________________________________ > Gerd Mueller ge...@sm... > SMB GmbH http://www.smb-tec.com > > _______________________________________________ > Tm4j-developers mailing list > Tm4...@li... > http://lists.sourceforge.net/lists/listinfo/tm4j-developers > |