Seems fine. However do not use new Boolean(true), the singleton instance Boolean.TRUE can be reused producing less garbage. Also, it is generally not recommended to include the commented alternative variants of code. If you are not sure if the simpler, more effective implementation actually works, write a simple test case for yourself and the best convert it later into Mauve test. The performance can also be optimized later, having the working implementation as a priority.

Audrius


Reply via email to