On Tue, 4 Nov 2003, Herve Quiroz wrote:

> Hi,
>
>
> I am using commons-functor to build a network simulator (based upon an
> XML document modified through procedures and validated against
> predicates each cycle). I had to develop several additions to
> commons-functor and I thought I could donate them to commons-functor.
>
> There are several functors but here are IMHO the most relevant ones:
>
>  - class Predicates: Predicates utility methods
>
> public static Or or(Collection predicates);
> public static And and(Collection predicates);
>
> As there is no constructor for Or/And predicates with a collection as
> parameter, these methods provide a way to get them.

Sounds like a good idea, although I'm having trouble coming up with a
reason why we just wouldn't make these methods of Or and And directly?

>
>  - class WhileDoProcedure: loop procedure
>
> The constructor takes a condition (Predicate) and an action (Procedure).
> The run() method loops, each time testing the condition and running the
> action.
>
>
>  - class WhileDoProcedure: loop procedure
>
> Same as above but the running the action and then test the condition.
>
> Note: the two last classes extend AbstractLoopProcedure

Sounds good as well.  I assume one of these is not named "WhileDo",
perhaps the latter is DoWhile?

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

> Regards,
>
> Herve
>

-- 
- Rod <http://radio.weblogs.com/0122027/>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to