Hello,
We are attempting to integrate Handlebars into our core product. We have an existing data store which is essentially a Map. We would like to have Handlebars use this. However, the internal data store of Context is hard coded to be a HashMap.
This leaves us with two alternatives. We can copy the key/value pairs into the Context data Map, or we can define a new way of giving the data set for a Context.
I would like to define an interface ContextDataMap which provides get, put, putAll, and clear methods. The Context object would contain a ContextDataMap instance instead of a HashMap. The default for Context would use ContextDataMapImpl which defaults to a HashMap. Alternatively, the user could provide a different ContextDataMap.
This would allow us to use our existing data structure when wrapped inside the interface implementation.
Does anyone see any potential issues with this approach?
Thanks,
Phil