Scraping Your Boilerplate
Sven Eric Panitz
The Scrap Your Boilerplate Pattern in Java
It is shown how the scrap your boilerplate design pattern, which
has been presented in the functional
programming community, can easily be implemented in Java.
It addresses generic programming of tree traversal. Generic methods for
traversing an arbitrary tree structure are presented. The actual application
logic will be clearly seperated from the boilerplate traversal code.
A crucial role for the basic tree
traversion plays the interface Iterable, which has been added to
the latest version of the Java API .