My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Links

This Java implementation is a straightforward standalone implementation of the ET++ Anything. An Anything is a recursive container which combines a vector and a hashmap into one data structure.

The implementation dates back to 1997 and was initially done by IFA Informatik and Andre Weinand. In 1999 it was enhanced by itopia and Marcel Rueedi. In 2006 it was brought to Google Code by Stefan Tramm. In 2007 Thomas Marti did a complete redesign of the API and started implementing it in Java 5. The new Anything API features a revised internal type system, consolidated/unified naming of classes/methods and a bunch of new convenience methods. There's also a "fluent API"-style layer available, which allows for code constructs like the following:

Any any = Anything.getMutableAny(new Object[] {"1", "a", "12", true, 2, 15, "8"});

List<Long> list = any.give(asList(ofLong(), where(isNumber())).backwards());
// list = [8, 15, 2, 1, 12, 1]

BigDecimal sum = any.give(sum(where(isNumberType())));
// sum = 17 (2 + 15)

sum = any.give(sum(withDefault(0)));
// sum = 39 (1 + 0 + 12 + 1 + 2 + 15 + 8)

The Anything pattern, its implementation and extensions for JDBC were presented at the Jazoon07 conference in Zürich (Switzerland). Stefan Tramm gave 45min talk in the technical sessions track, take a look at http://jazoon.com/portals/0/Content/ArchivWebsite/jazoon.com/jazoon07/en/conference/presentationdetails4789.html.

Powered by Google Project Hosting