Changes between Version 2 and Version 3 of PRO_LIB_MODEL_PRO_LISTS_R0


Ignore:
Timestamp:
04/10/09 16:01:12 (16 years ago)
Author:
nenko
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PRO_LIB_MODEL_PRO_LISTS_R0

    v2 v3  
    2727 
    2828= Design = 
    29 ^(Describe your design here.)^ 
     29In order to get better performance without making huge refactoring (introduce new type, replace using old types with the new one etc.) two methods will be added to the ProList interface. Their implementation will be in BaseProList and this will keep other classes and their use with no change. 
     30 
     31A new field will be added to BaseProList - a Map instance where will be stored the elements from the list under some key. This doesn't remove the need from the list itself. Nothing of this will remove some existing code. Only new code will be added. 
     32 
     33A new class will be added - ListEntry. It will have two field - key : Obejct and value : Object. This class will serve as a helper class for work with the Map.  
     34 
     35In the add/remove method of ProList will be added new functionality that will add the parameter to the map with the following rules: 
     36 * If the parameter is ListEntry - the key in the map is the key of ListEntry  
     37 * if the parameter is Immutable - the key in the map is the Immutable object (its hashCode) 
     38 * if the parameter is Mutable - the added in the map is null 
     39 
     40The two new methods are :  
     41 * findAll (key : Object) : List<ListEntry> - this method will return all the entries in the list with the specified key 
     42 * findOne (key : Object) : ListEntry - this method will return only one entry from the list for the key. More - if there are more than one entry an exception will be thrown 
     43 
     44 
    3045 
    3146= Implementation =