commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Herve Quiroz <herve.qui...@esil.univ-mrs.fr>
Subject Re: [functor] possible contributions
Date Wed, 05 Nov 2003 16:29:45 GMT
On Tue, Nov 04, 2003 at 09:06:37AM -0800, Rodney Waldhoff wrote:
> > There are some others but I need to classify them and decide which ones
> > are generic enough to be part of commons-functor...
> >
> > Obviously, I will provide everything with complete Javadoc support and
> > test cases whenever it is relevant.
> >
> 
> Great.  Feel free to submit patches to the dev list.

I have already refactored DoWhileProcedure and WhileDoProcedure. The
problem I have now is for unit tests. I plan to test it using a loop
that increments a counter (probably an Integer). So I could assert
values and predicates reagarding the counter at beginning and at the end
of the loop.

To do this, I need a procedure such as IntegerIncrementProcedure that
increments an internal counter at run(). So I ask you: should I code
this class as a internal class restricted to testing purposes or should
I provide this class as a public one to the commons-functor package ? In
the later case, where should I put it (in which package) ? maybe
org.apache.commons.functor.core.number ? But this could instead be the
scope of a commons-math subpackage...

What do you think of it ?

Herve

PS: While reading my mail looking for typos, I realized that such a
procedure would not be quite useful (IntegerIncrementProcedure).
Instead, what about some IntegerIncrementUnaryProcedure that increments
the parameter o at run(Object o) ? The former Procedure could then be
built using a BoundProcedure...

PPS: Maybe things are going to be a litlle more complex than I thought
with this math/functor issue... I should probably code what I need as an
internal class (or an example at least) for now before you decide what
to do with this math/functor stuff.

---------------------------------------------------------------------
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