commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Venkatesh Prasad Ranganath <vrangan...@sbcglobal.net>
Subject Re: [Collections]: FilteredXxx Contribution
Date Sun, 27 Jun 2004 22:02:50 GMT
Stephen Colebourne wrote:

>Do you mean you have a FilteredMap or a FilteredList? Both are quite useful
>
>I assume that it works by simply restricting those elements of the complete
>map/list that can be seen?
>And is it written as a decorator, extending AbstractList/MapDecorator?
>
>  
>
It is written as a decorator, but restriction is not as mentioned 
above.  It is written in a way that it subsumes some of the 
predicatedXXXX class behavior.  In simple words, a filtered map provides 
a decorated "view" to the map and the view is editable, i.e., the user 
can call dMap.clear() and all the objects that occur in that view (that 
satisfy the predicate) will be deleted from the map.  All operations of 
Collections are "filtered". To differentiate, PredicatedXXXX enable 
controlled addition to the decorated collection whereas FilteredXXXX 
enable controlled access and update to the decorated collection.

Comments?

>Perhaps the steps would be to
>1) Add your current code to a Bugzilla entry so we can see it and check the
>basic principle
>2) If we OK it, then format  it, include the Apache licence and write tests
>
>Is that OK?
>
>Stephen
>
>
>----- Original Message -----
>From: "Venkatesh Prasad Ranganath" <comfortably007numb-python@yahoo.com>
>  
>
>>I have implemented a simple filtered map class similar in spirit to
>>    
>>
>PredicatedList.  I would like to contribute it to
>  
>
>>Collections library. To do so, would performing the following tasks and
>>    
>>
>mailing the resulting code to the development mailing
>  
>
>>list suffice?
>>
>>   - format the code according to jakarta guidelines.
>>   - write unit tests to test the new class.
>>    
>>
>
>
>
>  
>


-- 

Venkatesh Prasad Ranganath,
Dept. Computing and Information Science,
Kansas State University, US.
web: http://www.cis.ksu.edu/~rvprasad


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message