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.
jga borrows the functors from C++ STL library, and extends them with functors that are natural for java programmers. jga also borrows the notion that basic functors implementing common operations can be profitably combined into compound structures to implement more useful logic.
Requirements
- Java 1.4 or later. The jga-0.8.jar supports Generics and is used with the 1.5 JDK, while the jga-0.8-retro.jar supports development with the Java 1.4 JDK without generics. Note that I have not tested jga with any release of Java 1.6. There shouldn't be any problems, but you never know until you try.
- [Optional] JUnit 3.8.1 and jfcUnit 1.0.3 (if you want to run the tests)
Installation
At this point, installation is pretty simple. Copy any of jga-0.8-*.jar files (depending on which compiler you use and your licensing needs) onto your classpath and you're pretty much set.Building
To rebuild this version, you must use the 1.5.0 release of the Java JDK.Unpack src.jar
To build the standard version, use the 'jar' target
$ ant jar
To build the compatability version, use the 'retrojar' target$ ant retrojar