(OFBIZ-10485)
This commit applies multiple new refactoring enhancements as follows:
- rename stackList to contexts (the data structure holding the context Deque)
- refactor the size function to utilize streams to sum all keys
- Implement a function "entryStream()" that returns a stream of all keys in the
correct sequential order and utilize this function in multiple functions for
iterating over the keys including "containsValue", "values" and "entrySet".
This implementation is necessary to avoid code repetition and ensure correct
order with no duplicates
- Re-design the get functions of the context map to use a generic function with
a functional interface "withMapContainingKey". The purpose of it is to avoid
checking for nulls and instead use the "containsKey" function followed by the
injected lambda expressions in both signatures of the get function
Thanks: Mathieu Lirzin for the patch and implementing suggested changes.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1837462 13f79535-47bb-0310-9956-ffa450edef68