eclipse-collections
eclipse-collections copied to clipboard
Implement #744 : Add range method to Interval
Signed-off-by: govi20 [email protected]
Add range() method to Interval which has a behavior similar to the IntStream.range
@govi20 sorry, I missed replying to your question. Interval is an interesting class (data structure). It behaves lazy as well as eager in some patterns. In order to create an empty Interval you might want to create a private sub-class called EmptyInterval and override the iteration patterns.
@isank I think you just need to add the test @nikhilnanivadekar requested and he'll probably approve and merge.
Need a test to compare with the behavior of
IntStream.range()