Java: Equivalent of Python's range(int, int)?

后端 未结 14 1861
北荒
北荒 2020-12-02 08:17

Does Java have an equivalent to Python\'s range(int, int) method?

14条回答
  •  感情败类
    2020-12-02 09:00

    The "Functional Java" library allows to program in such a way to a limited degree, it has a range() method creating an fj.data.Array instance.

    See:

    • http://functionaljava.googlecode.com/svn/artifacts/3.0/javadoc/fj/data/Array.html#range%28int,%20int%29

    Similarly the "Totally Lazy" library offers a lazy range method: http://code.google.com/p/totallylazy/

提交回复
热议问题