Archive for the 'Fluent Interface' Category
Fluent interfaces everywhere
0 Comments Published December 4th, 2007 in Beautiful Java, Fluent Interface, JavaI wrote about fluent interfaces for several times. A comment on my best MarkupBuilder in Java try pointed to a fluent inteface for JAXB. Excellent, thanks Hristo.
The best Markup Builder I could build in Java
8 Comments Published November 30th, 2007 in Beautiful Java, Fluent Interface, Groovy and Grails, Java, Java 7Using Groovy MarkupBuilders spoiled me for other ways to create HTML pages from code. Others think the same. But in some organizations you have to use Java and can’t use Groovy - at least when you can’t sneak it in.
So I tinkered around in Java to see what’s the best MarkupBuilder I can write […]
Fluent Interface for Regular Expressions
0 Comments Published October 29th, 2007 in Fluent Interface, JavaSome years ago when we migrated Radeox - a wiki engine - to a new Regular Expression engine, we had to change lots of Regular Expressions. Today I would do it in a different way, with Fluent Interfaces. Joshua has a solution for building Regular expressions with a Fluent Interface, about which I wrote before. […]
Creating a fluent interface for Google Collections
6 Comments Published October 17th, 2007 in Fluent Interface, Google collections, Groovy and Grails, JavaChris wrote about functional programming in Java. As an example he used Google Collections which “is a suite of new collections and collection-related goodness for Java 5.0″.
Looking at his post he gives the following code on how to use Goolge Collections
files = Iterables.transform(
Iterables.filter(
Iterables.filter(getPagesList(),WebPage.class),undeletedPages),
new PagesToFilesTransformation()))
This […]
Fluent Interface and Reflection for Object Building in Java
10 Comments Published October 10th, 2007 in Fluent Interface, JavaA post by Randy Patterson on creating fluent interfaces in C# got me thinking. Randy shows how to create a Fluent Interface to build an object. He uses a Person class (POJO) with setFirstName and a PersonFluentInterface class with firstName. Creating an object and setting some attributes needs quite a lot of code:
Person person = […]