Can Java handle void *functionTypes as C++ does
Posted on 1997-07-16
I am writing on a data structure code library in Java and run into the need of function types. Here is a code example in C++ ( in a binary search tree class)
this would be in the BStree.h Header file in C++
typedef void (*functionType)(Object & anItem);
// This function will be defined outside of this class
} // end class
No I am wondering how to use the same mechanism in Java in order to write the same kind of function.
As a possability I am able to transform the whole thing into an Enumeration but that doesn't seem to be a nice solution.
Thanks a lot !!