Wednesday, March 17, 2010

op4j - a useful java library

op4j is a cool java library with lots of nice features. Let's hear the definition of op4j from the official website;

It is a Java library aimed at improving quality, semantics, cleanness and readability of Java code, especially auxiliary code like data conversion, structure iteration, filtering, mapping.

These are the features of the library (again, from the website):

  • Apply functions on object:
    Including more than 200 predefined functions for data conversion, string handling, calendar operation, math operations, etc...

  • Manage structures (arrays, lists, maps and sets), including:
    Easily creating them from their elements (building).
    Modifying them (adding / removing / replacing elements).
    Iterating them, applying functions on each element.
    Transforming them into other structures.

  • Execute conditional logic (execute actions depending on conditions).

  • Define functions from expressions, for later use (similar to closures).

I recommend the reading of the op4j presentation here for further information.