eclipse-collections
eclipse-collections copied to clipboard
primitive and generic map interface methods that return views should always return lazy iterables
I noticed while browsing primitive map interfaces that, for example, the keysView() will return a lazy iterable, but the keyValueView() won't.
Also in generic MapIterable interface, keyView(), keyValueView() and valuesView() will return RichIterable but will always have it implemented with LazyIterable. Also the javadoc says it should return a lazy iterable.
I would propose to unify all of this by:
- always returning lazy iterables in all situations
- add
valuesView()also to primitive maps (simply delegating toasLazy())
I think it would nicely improve the dev experience of eclipse-collections users :)