ddimtirov / nuggets

nuggets is (yet another) utility library for Java
https://ddimtirov.github.io/nuggets/javadoc/io/github/ddimitrov/nuggets/package-summary.html
Apache License 2.0
4 stars 1 forks source link

'Named' decorators for JDK functional objects #22

Closed ddimtirov closed 7 years ago

ddimtirov commented 8 years ago

Provide decorators for the generic functional interfaces that print a caller-specified toString() message.

Useful for libraries that return lambdas to be used as filters, transformers or predicates.

ddimtirov commented 7 years ago

See also http://stackoverflow.com/q/40957359/18187 for background on naming and signatures.

ddimtirov commented 7 years ago

Added a Closure.named(name) Groovy extension, but right now can't see how to decorate Kotlin functions. Not sure if needed, so leaving for another day.