Package javautils.fun

Framework for functional objects.

See:
          Description

Class Summary
Function An arbitrary function or procedure.
ObjectToBoolean Object->boolean function.
ObjectToObject Object->Object function.
ObjectToObjectToBoolean Object->Object->boolean function.
ObjectToObjectToObject Object->Object->Object function.
ObjectToObjectToVoid Object->Object->void procedure.
ObjectToVoid Object->void procedure.
VoidToObject void->Object procedure.
VoidToVoid void->void procedure.
 

Package javautils.fun Description

Framework for functional objects.

Representing functions using more complex objects is an instance of the Abstraction Inversion-antipattern [Abstraction Inversion (http://c2.com/cgi/wiki?AbstractionInversion)]. [Note that the antipattern here applies to the design of the Java language and also to the idea that we should build functional abstractions on top of object-oriented abstractions rather than vice versa [Kühne1999].] However, simple functions, rather than more specialized Strategy [Gamma1995] objects, are quite often appropriate for a design and because some OO languages, such as Java, do not provide first class functions, it makes sense to emulate them using the more complex class mechanism.