Generic Algorithms for Java (JGA) v0.8 is now available at
The major focus of this release is incorporating feedback from users. There are two major changes in this release based on such feedback.
First, to make it a lot easier for new users to find and use the algorithmic functionality, there is now a new package that exposes the various supported algorithms (find, filter/remove, merge/append, unique, transform, summarize, and sort) in static classes based on what they each do. Second, a popular suggestion is to make the functors available via static methods in leiu of calling their individual constructors. ... read more
jga: Generic Algorithms for Java, release 0.7 is now available at
jga is a functors library: the intent is to explore and exploit
functors as a design and implementation tool to reduce boilerplate
coding. A functor is an object that encapsulates a function or
expression: it can take arguments and produce results, as can any
method, expression, or function (in other languages that support
functions). Unlike an expression, as an object it can be passed as an
argument without being executed; it can be persisted to a database or
file; it can be serialized and passed from client to server (and
back); and it can be instantiated at runtime based on information
unavailable at compile-time.... read more
The Spreadsheet widget in the net.sf.jga.swing package grew out of a couple of design goals behind the jga library. The first was that a spreadsheet could be thought of as a sparse matrix of function objects. The second was that to really use a spreadsheet would require some language that the user could enter into the cells. A 'scripting' capability that would allow a much easier method for creating compound functors has always been on the list of goals for this project.... read more
jga: Generic Algorithms for Java, release 0.6 is now available at
The goal of the project is to supply the functors, predicates, and
algorithms missing from STL in java. jga won't reproduce STL in all
of its details and methods. Instead, jga adapts the functionality of
STL to java idioms: where C++/STL provide different interpretations
of standard design patterns, jga stays true to standard Java
practices. Example usage is provided by applying the functionality
of the library to swing models, editors, and renderers that can
greatly reduce boilerplate classes in desktop development.... read more
One of the new features in Java 1.5 is the new forloop syntax. The new
forloop is analagous to a foreach construct that is common in other
languages. The syntax hides the existance of an iterator, and is even
extended to cases that didn't have an iterator before (arrays). It
also extends to enumerated types.
So, if hiding the iterator is a step forward, can we take things
another step and capture more of the common patterns as part of the
loop mechanism? The answer is 'sort of'. We can't completely hide the
fact that decisions are being made, and that some elements are being
processed. What we can do is hide a lot of the mechanics of the
process.... read more
In an effort to better organize the information on the site, the
jga.sf.net site has been redesigned. Now there are direct links
to news stories from the home page, an RSS feed, and a more modern
overall look and feel. The new structure also allows for better
organization as more content is added.
The site works on modern browsers: specifically IE and Mozilla.
Older versions may have some problems with display (Mozilla 1.2,
for example, has a problem with the top of the content area
being hidden by the banner). If you find problems, please cut
a screen shot and send it to me at davidahall@users.sf.net, and
also be sure to tell me what browser and version you use.
jga's swing package will be featured as the examples at my 2004
JavaOne session, TS-3802 'Applying Generics and Functors to Desktop
Java Programming'. In a way, it means that jga has now come full
circle: it started after a BOF session that I gave in 2002 (slides
posted at http://jga.sf.net/docs/JavaOne2002\). This time out, I'll
be using the swing examples to explain how generics and functors
separately improve code quality and how they work together to reduce
boilerplate coding. The session is on the desktop track since all
the examples are based on swing.... read more
jga: Generic Algorithms for Java, release 0.5 is now available at
The goal of the project is to supply the functors, predicates, and
algorithms missing from STL in java. jga won't reproduce STL in all
of its details and methods. Instead, jga adapts the functionality of
STL to java idioms: where C++/STL provide different interpretations
of standard design patterns, jga stays true to standard Java
practices. Example usage is provided by applying the functionality
of the library to swing models, editors, and renderers that can
greatly reduce boilerplate classes in desktop development.... read more
jga: Generic Algorithms for Java, release 0.4.0 is now available at
The goal of the project is to supply the functors, predicates, and
algorithms missing from STL in java. jga won't reproduce STL in all
of its details and methods. Instead, jga adapts the functionality of
STL to java idioms: where C++/STL provide different interpretations
of standard design patterns, jga stays true to standard Java
practices.... read more
JGA builds on the Generic Java compiler, providing common algorithms that are not currently provided the java standard libraries, functors and predicates, and implementations of common java classes that are adapted for use with generics.
New in this release are a collection of algorithms adapted from STL that operate over standard collections or iterators. All of the algorithms that do not attempt to modify the existing collection or create a new one have been adapted. Additionally, the complete set of predicates and functors has been updated in this release to make working with complex nested functor structures a lot easier.... read more
The latest release of Java(tm) Generic Algorithms -- v0.2.1 -- is ready.
I've added a test target to the build script that:
- creates a non-generic form of the test framework
- compiles this form with a standard compiler and jga.jar
- executes the results with standard runtime libs.
The results of the test are consistent green-bars.
The slides from my JavaOne 2002 BOF 'Writing and Using Java Programming Language-Based Predicates ('Java Predicates')' are now online at http://jga.sourceforge.net/docs/JavaOne2002/index.shtml.