This is a basic implementation of
FunctionFactory
. It implements the insertion and retrieval methods, but it doesn't actually setup the factory with any functions. It also assumes a certain model with regard to the different kinds of functions (Target, Condition, and General). For this reason, you may want to re-use this class, or you may want to extend FunctionFactory directly, if you're writing a new factory implementation.
Note that while this class is thread-safe on all creation methods, it is not safe to add support for a new function while creating an instance of a function. This follows from the assumption that most people will initialize these factories up-front, and then start processing without ever modifying the factories. If you need these mutual operations to be thread-safe, then you should write a wrapper class that implements the right synchronization.
@since 1.2
@author Seth ProctorAdding generic type support by Christian Mueller (geotools)