commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bruno P. Kinoshita" <ki...@apache.org>
Subject [functor] Replace oac.functor.adapter package by static helper functions
Date Wed, 30 Jan 2013 00:47:40 GMT
Hi all, 

In the next days I'll try in a branch or in github to replace some of the classes in oac.functor.adapter
package by static helper functions, like Functions and Predicates (also present in lambda
project - Java 8).

So instead of:

UnaryPredicate<String> isEmpty = ...;
UnaryPredicateUnaryFunction<String> isEmptyFunction = UnaryPredicateUnaryFunction.adapt(isEmpty);

We could have more or less:

UnaryPredicate<String> p = ...;
UnaryFunction<String, Boolean> f = Predicates.asFunction(p);

Besides being easier to use, It could reduce the number of public classes in [functor]-core
too.

Feel free to chime in if you have any suggestions about this :)

Thanks in advance!

Bruno P. Kinoshita
http://kinoshita.eti.br
http://tupilabs.com 

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


Mime
View raw message