commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alban Peignier <>
Subject [functor] [proposal] various implementations
Date Fri, 04 Feb 2005 13:46:01 GMT

In the context of a show-case application, we created a small set of
classes to generator random values. We based them on the functor API.

These are a small description of the created classes :

* org.apache.commons.functor.generator.ConstantGenerator
Provides constant values (a fixed count or via a continuation Predicate)
* org.apache.commons.functor.generator.FunctionToGeneratorAdapter
Generates the values provided by a given Function
* org.apache.commons.functor.generator.CompositeGenerator
Provides implementations which composite several Generators (like
concatening the generated values of several Generators)
* org.apache.commons.functor.generator.util.CharSetGenerator
Generates characters of a given CharSet
* org.apache.commons.functor.generator.util.CharRangeGenerator
Generates characters of a given CharRange
* org.apache.commons.functor.generator.util.RandomizeGenerator
Randomize the values generated by a given Generator
* org.apache.commons.functor.generator.GeneratorToFunctionAdapter
Function implementation which returns the values given by a Generator
* org.apache.commons.functor.adapter.FunctionIterator
Function implementation which returns the values of an Iterator
* org.apache.commons.functor.core.RandomFunction
Function implementations which returns the values of an Random object
* org.apache.commons.functor.core.StringFunction
Function implementations which creates String instances (from character
functions, etc ..)
* org.apache.commons.functor.collection.GetElement
Function implementations which returns one of the List elements
* org.apache.commons.functor.composite.NumericalSwitchFunction
Function implementation which follows a switch/case logic according to
the numeric value returned by a Function.

These implementations are documented and tested. We can provide the
related patch(es) if it seems usefull.

King regards
Alban Peignier -

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message