You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Venkatesh Prasad Ranganath <co...@yahoo.com> on 2004/06/27 07:13:25 UTC

[Collections]: Contribution

Hi,

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.

waiting for reply,

-- 

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


Re: [Collections]: FilteredXxx Contribution

Posted by Stephen Colebourne <sc...@btopenworld.com>.
From: "Venkatesh Prasad Ranganath" <co...@yahoo.com>
> > 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
>
> Does this mean that if there is no Bugzilla entry, I just create one and
use that as the contribution reference?

Yes, bugzilla is for enhancements as well as bugs. It has a convenient way
to add files which is why I reccomend that approach.

Stephen


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


Re: [Collections]: FilteredXxx Contribution

Posted by Venkatesh Prasad Ranganath <co...@yahoo.com>.
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?
> 
> 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

Does this mean that if there is no Bugzilla entry, I just create one and use that as the contribution reference?

> 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" <co...@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


Re: [Collections]: FilteredXxx Contribution

Posted by Stephen Colebourne <sc...@btopenworld.com>.
From: "Venkatesh Prasad Ranganath" <co...@yahoo.com>
> > 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.
>
> On pondering and implementing a little bit more, I think a
FilteredCollection, FilteredCollectionIterator, FilteredList, and
> FilteredMap should provide sufficient operations to view (read-only) a
collection (Set, List, Bag) and a map through a filter.

Bear in mind [collections] already has a FilteredIterator. Set, Bag etc are
less important than the Collection, List and Map in typical applications.

Certainly, read/write access via a filter view has to be the goal of these
classes IMHO.

Stephen


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


Re: [Collections]: FilteredXxx Contribution

Posted by Venkatesh Prasad Ranganath <co...@yahoo.com>.
Venkatesh Prasad Ranganath wrote:
> 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.

On pondering and implementing a little bit more, I think a FilteredCollection, FilteredCollectionIterator, FilteredList, and 
FilteredMap should provide sufficient operations to view (read-only) a collection (Set, List, Bag) and a map through a filter.

Comments?

-- 

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


Re: [Collections]: FilteredXxx Contribution

Posted by Venkatesh Prasad Ranganath <vr...@sbcglobal.net>.
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" <co...@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


Re: [Collections]: FilteredXxx Contribution

Posted by Stephen Colebourne <sc...@btopenworld.com>.
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?

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" <co...@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.



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