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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to