[COLLECTIONS-508] Improved original contribution after feedback. Thanks to Dipanjan Laha.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1585335 13f79535-47bb-0310-9956-ffa450edef68